When learning to play the guitar, one important aspect is to keep time. Rhythm in music is all about timing and keeping time will assure that the rhythm is intact. Not keeping up with the timing or the beat of the music will make it sound discordant, off key, off tangent, in short, not nice.
The rhythm of the music depends on the notation of the notes by the composer. The common symbols are used to describe how long a note is to be played, or how short and in between so many other notes. The beats measure out the timing of the music.
As stated in jamorama, although some guitar players can play the guitar by ear alone, it is still important to understand the values of time for the notes to see how the rhythm of the music is established. There are the whole notes which have 4 beats, the half notes which have 2 beats, the quarter note has 1 beat and the eighth note has ½ beat.
Two eighth notes will make 1 beat or two whole notes will make 8 beats. With the different combinations, the composer can now establish the rhythm and the timing of the notes and make the music flow.