Scales. Learn em. Start with this one, two notes on each string, starting from the open low E:
3rd fret g
2nd fret B
2nd fret E
2nd Fret A
3rd fret D
Open (high string) E
3rd fret (g)
Take that scale and learn it. As given there, it will play a country-style lead in the key of G, or a blues/rock style in key of E (that is, you play the same scale over the appropriate chords.)
Then figure that same scale out all the way up the fretboard. (There are charts). You can now play lead guitar. There are other scales (regular major and minor, for jazz kind of leads,) and you can depart from the notes on the scale briefly for a more interesting sound--you just have to start and end any phrase with a note on the scale.
Learning the scales is easy. The interesting and fun stuff is learning to phrase. You have to know what note you're going to end up on when you start a phrase, or at least have an idea.