Alternating bass is a technique where the thumb alternates between two or more bass notes, while the fingers play a melody on the higher strings. The technique is used in several musical styles, such as Piedmont Blues (Mississippi John Hurt), and is sometimes called boom-chick rhythm. The boom-chick rhythm gets really groovy when you emphasize beats two and four. You can do this by playing the corresponding notes a little louder or by hitting more than one string on beats two and four. Big Bill Broonzy, a Country Blues guitarist from the early days, was famous for his heavily accented alternating bass.
Bar 1: For the G chord I use the fingering described here as variation 1, which makes it really easy to change from C to G and vice versa.
Bar 2, 6 and 8: Use your thumb to play the bass notes on beats 2 and 4 (Yes, usually this is index finger territory, but the thumb produces a better, more consistent sound).