The bass helps to keep solid time and provide the basic feel and drive along with the drummer. The bass and bass drum parts are often closely linked. The bass also spells out the chords and lays the foundation for the harmony of the song. Together, the bass and drums are called the rhythm section.
While a singer or horn player has time to breathe between phrases and a guitarist or keyboard player leaves space between lines or chords, the drummer and bass player have to play consistently to keep the groove going and feeling good. It is the job of the rhythm guitarist to "lock in" with the rhythm section to keep the feel tight and drive the song forward.
Most electric basses have four strings which correspond to the bottom four strings of the guitar (E, A, D and G). The difference is that they are tuned one octave lower than the guitar. The strings are much thicker than guitar strings and the lower frets are wider apart. Like the electric guitar, the bass has pickups (usually two) and is played through an amplifier. The bass is usually played with the index and middle fingers of the right hand, or "slap" style with the thumb and index finger, but it can also be played with a pick. The photo below shows a typical electric bass.