In the early days of bass playing, when the electric bass was starting out, bass players would simply cup their right hand (or stronger hand) around the bottom of the bass pickup and pluck the strings with their thumb. Quickly they developed more sophisticated right hand technique, and the "legit" way to hit the strings is by balancing the thumb on the top of the pickup and plucking the strings upward by alternating the index and middle fingers. With practice this is a very efficient way to play, and it is the preferred method of the "serious" musicians.
But it isn't the only way to play. Some bass players took to using picks after going to the bass from the guitar, some find they can play faster with a pick, and some just like the harder growl that a pick sound can produce. It certainly looks more active onstage, which is why you'll rarely ever see a punk bassist play with his fingers; there's just something too... refined about it.
There is also, of course, the "slapping and popping" techniques introduced by pioneers like Stanley Clarke and Larry Graham of Sly and the Family Stone. This technique involves hitting the deep E or A strings of a bass with the thumb, while pulling the higher G or D strings up off the body and letting them snap back against the neck. In the hands of a master, this is great stuff to hear, but it is a good deal beyond the scope of my modest site. The important thing to remember is that no matter how you play, find the way that feels comfortable and fits the music.