Often, the guitarist will play a melody and its accompanying chords simultaneously, which enables a single guitarist to provide both of these important song elements.
Often, the guitarist will play the melody notes, interspersed with the melody's accompanying chords and the deep bassline (or bass notes) simultaneously. This enables a single guitarist to provide all of these important song elements.