How do I know what chord goes with a given line of notes?
Well, lets focus on that "given line of notes," as that is where your answer lies. As BGD notes, that melody will probably focus on a tonal center, which is what you want to find. In theory terms, we call this the song's "key" and will tell you which notes, and therefore, which chords are suitable over that melody line. It will also tell you which scales are appropriate over those chords.
Someday we'll win this thing...www.aclosesecond.com