To play the 1st note, place the index finger of your left hand (if you're right handed) on the thickest string (the low E string, string 6) just behind (to the immediate left of) the 5th fret (frets are the metal ridges in the guitar neck) and pluck that string with the thumb of your right hand. You can also use a pick instead of your thumb.
To play the 2nd note, place your pinky finger just behind the 8th fret on the thickest string (the low E string, string 6) and pluck that string.
To play the 3rd note, place your index finger just behind the 5th fret on the second thickest string (the A string, string 5) and pluck that string.
To play the 4th note, place your ring finger just behind the 7th fret on the second thickest string (the A string, string 5) and pluck that string.
To play the rest of the notes just follow the diagram.
Then play the notes in the reverse order.
Once you get comfortable playing the notes forward and backward in order, then you can skip around.
Special note about the key of G:
In the note pattern in the key of G in step 1 above, you'll notice that the black dots on the left are off of the edge of the guitar. This means that you play these notes by plucking each string "open" (without putting any fingers down). The edge of the guitar takes the place of your index finger. You can use whichever fingers you like to play the other notes.