How to Learn and Play Basic Guitar Solo's (Pentatonic Scale)
Guitar solo's are what most people imagine when the think of someone playing guitar, they are generally much better remembered than the parts played by a rhythm guitarist. Thus it's understandable why most people when learning guitar want to become good at the fast fiddly stuff.
Guitar solo's are very impressive, and some of which are also very difficult and technical. However lots of the most famous riffs are actually based of very simple musical theory, and surprisingly easy to learn. This is why you hear most beginner players playing the riff from "Sweet Child of Mine".
Pentatonic Scale
If you are going to learn a single scale/piece of music theory then the pentatonic scale is probably the most important. Almost every single popular solo is based off it to a certain extent, and many famous solo's are completely based off it. There are 5 shapes of the scale, all of which are useful to know, however by far the most common form is the E Shape and that I what I will focus on below.
Bellow is a diagram of the E Shape pentatonic scale from the 7th Fret, the scale can be moved to start from any other odd numbered fret. The scale is played in the order as stated by the numbers, with your index finger on the 7th fret, Ring finger 9th and Pinky/little finger on the 10th fret.
On its own the pentatonic scale isn't very impressive. However if you just start playing around and mixing up the order, changing direction in different places then it is easy to create a really fun and good sounding riff, add in a couple of bends and you have almost created a solo. Shredding is even more simple, a lot of the time it is just playing the scale very quickly (there is more to it, however playing the scale quickly is the basis.).
A good exercise when practicing guitar is to do the pentatonic scale up and down the full fretboard, once you have done it in one position move it up 2 frets and do it again. When you can do this quickly, start modifying it so you find it a challenge again, for example doing two strokes on each note thus improving your picking speed. You should always be looking to be challenging yourself because that is the only way to improve.
Chord Solo's
A second type of solo that is more rarely used however still used on some well known songs is playing the notes of a chord individually. Because the individual notes are all part of the same chord they compliment each other nicely. This style avoids you having to make many quick movements with your hand and thus allowing you to hold notes for longer and let each note ring out over the previous one.
A really good example of this type of playing is the introduction to America by Razorlight where the C chord is used in on the 7th and 9th frets (with a capo). This is also useful because of the reduced complexity where you don't have to move your hands thus it is easier for a guitarist to sing whilst playing a part like this.
Imagine solo's are like a singers voice
When you are playing and writing solo's keep in the back of your mind to try to play your guitar as if it's a voice. The way you combine quick flicks of notes and longer holds and bends should be easily compared to a singers voice, solos like this sound very flowing and natural. A very good example of this is Layla by Eric Claptonm, notice how his riffs combine very nicely with his vocals.