There are many ways to approach a bass guitar... for example;

Most people will play it as a rhythm instrument, to keep the beat etc (almost every bassist nowadays)

Some will keep the rhythm but in a much more colorful manner, they can use effect pedals, have isolated parts, solos, and else. Good examples of this, are the bassist of the band Tool, Justin Chancellor who's famous for his use of effects pedals, mainly the whammy, or Cliff Burton from Metallica with his signature distortion+wah boost sound. This kind of bassist is something inbetwen a rythm guy and a lead guy (see below) some tend to lean more towards rythm and some the other way around.

Some are reffered to as "lead" bassist, in this case the bassline is much more elaborated and melodic, drums keep the beat and guitars and else give color. Good examples are Peter Hook from Joy Division, he has a signature chorus sound which is really recognisable, and is famous for his original basslines exploting his G (hehe...) and D strings. Also Simon Gallup in albums of The Cure such as Faith and Seventeen Seconds, he had really prominent basslines, alot of songs from that album are brought to life by an amazing bassline in combination with beautiful vocals, he used a flangy sound or a really agresivve tone.

Most bassist will have different approaches on different songs and albums etc.