To amend Dale's answer a bit, and give you credit for guessing right (about the second guitar part)
edited to lead with a TL:DR, -> They indicate chord changes in a song.
If you're bored, keep reading...
A rhythm guitarist/bassist/ukulele/harmonica player/pianist could "fake" an arrangement using those chord changes.
Some things to keep in mind, are that rhythm guitarists probably wouldn't just play a single strummed chord when they see D, or Dmin, or D7, etc (<- different chord shapes), they would usually play multiple strums with the beat of the song.
Bass players might play the single notes indicated, might play arpeggios using that note as a "base" note ie, they'd play something like D - then F# - then A - then the F# - D or whatever sounds most rhythmic. (or they could play power chords or double stops ie: D on the A string and D on the G string at the same time, etc)
With the ukulele, and many other instruments, you can play a chord-melody arrangement. Often that means a chorded strum on the change, followed by playing some cool sounding individual notes from the melody of the song. (like in combo mode from RS1) (Also, ukulele players often travel in large packs, so trying to get everyone to "meet up" at chord changes is a good way to keep in time if you don't have drums or bass to help with that.
Then you get those @!#$!%ers on piano who can play chords with the left hand while simultaneously playing melody with the right... (yes, I'm jealous)