Doesn't actually do much else, but it does serve to outline the chord being played at all times. This line plays the root three times, a leading note down to the fifth played twice, and then a two-note leading sequence back to the root. Of this vast array of chords, only a few four-note chords are widely used outside of jazz, and I'm only going to talk about those chords. They're made by adding one more note onto a basic three note chord. The most commonly used four-note chord is made by starting with a major chord and adding the note 1.5 steps above the fifth.
Seventh chords are easily the most commonly used four-note chord.
You can also make a minor seventh chord, by starting with a minor chord instead of a major chord. Another note you can add to a major chord is the note that is one whole step above the fifth of the chord. This note is called the 6th note, and a chord that contains it is called a 6th chord. The general pattern is known as the twelve-bar blues, and it's probably the most widely used song form in popular music. One last point on chords in bass lines.