Pentatonic Scales
Pentatonic scales contain only 5 notes before the pattern is repeated again from the root note. Penta – meaning five, Tonic – meaning tones. They are divided into two groups, Major Pentatonic Scales and Minor Pentatonic Scales.
The below pattern is a minor pentatonic scale in two octaves. The purple notes are the root notes, for example the first note of a scale pattern is the root note and the eigth note of the scale is the same note (see How to Play Octaves). To play the same scale in the second octave of the key, you would just repeat the same pattern but use the last root note as the first note (see the second example).
Quick Glossary:
Octave: Interval of 8 notes or the next occurrence of a particular note.
Key: Basically the main note that the scale is based around, the root note. 
If you are a little confused about how this diagram is presented, it’s simple.. Each of your 6 strings are represented horizontally across the diagram. So your little e string is at the top, and your big (low) E string is at the bottom of the diagram.
The vertical lines are the fret lines, so the notes appear between these lines (within the fret).
The first octave is from the first purple note (root note) to the green note right before the second purple note. From there, the pattern just repeats itself and this is where the second octave is from.
The following example is the EXACT same thing but we have substituted the notes to keep them all close together.

So when we apply this pattern to your guitar, it will look and sound like this:
e|-------------------------5-8------------------
B|---------------------5-8----------------------
G|-----------------5-7--------------------------
D|-------------5-7------------------------------
A|---------5-7----------------------------------
E|-----5-8--------------------------------------
This example is the an A minor pentatonic scale (this is determined by the root note which is an A note on the 5th fret of the 6th string). You will notice that the scale seems a little too long, this is just to include the first string. The red notes are the first octave of the scale, the blue notes make up the second octave of the scale, and the black notes are just the beginning of the third octave.
Remember, this pattern can be applied anywhere on the fretboard, thus changing the key. They can also be played in more octaves.