The Blues Scale
What many novice guitarists don't realize is that improvising (also referred to as "soloing") does not involve playing a series of random notes, in the hopes that they will sound great together. Rather, guitarists generally draw their guitar solos from a scale, using it as a template to improvise with. The Blues Scale (seen in the image on the right), despite it's name, is a scale which is used extensively in all styles of guitar solos.
Practice the scale forwards and backwards, using alternate picking, making sure to play each note cleanly and evenly. Next, try playing each note twice before moving to the next note. Invent different ways to play the scale that will challenge yourself technically.
To use the blues scale, play it so that the root of the scale (marked in red on the diagram) starts on the letter name of the scale you want to play. (If you haven't memorized the note names on the 6th string of the guitar, you'll want to spend some time learning the Fretboard.) For example, to play a C blues scale, find the note C on the sixth string (8th fret) and start the scale there.
At some point, you'll want to learn the different positions of the pentatonic scale, which will allow you to play solos all over the neck while staying in one key. For now, stick to this single scale position - many guitarists get a lot of mileage out of the scale position above.
Now, you're ready to improvise. The concept is simple enough - string together series of notes from the blues scale that sound pleasing together (these series of notes are often referred to as "licks"). Try doing this; it's harder than it sounds. The Accessrock.com web site offers some helpful guitar soloing lessons for new improvisers. Once you've done some experimenting, try visiting the Home for all Guitar Lovers site, which illustrates many guitar licks. Try memorizing, and utilizing some of these in your guitar solos.
Once you're comfortable with the blues scale, you'll want to play guitar solos along to some form of accompaniment. One of the more common things guitar players solo over is a 12 bar blues. For more insight into playing the 12 bar blues, how to go about playing it, and freely downloadable audio files of the blues to play along with, check the try playing along with the 12 bar blues audio files found on this site.