Alternating bass is a technique in which 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, e.g. Piedmont Blues (Mississippi John Hurt) and is sometimes called Boom-Chick rhythm. The Boom-Chick rhythm gets really groovy when you emphasize beat two and four. You can do this by playing the corresponding notes a bit louder or by hitting more than one string on beat two and four. Big Bill Broonzy, a Country Blues guitarist from the early days, was famous for his strongly 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).