The numbers on the fretboard tells you which fret to play, so...
0 would mean you'd play an open string
1 would mean that you press down on the first fret while playing
...5 would mean that you press down on the fifth fret while playing
A "hammer-on" is when you don't play anything with your playing hand. (right hand, if you play right handed, left hand, if you play left handed). You just press down on the fret position. If you do this hard enough, you can make a tone, without using your playing hand.
An common example:
G---------------------------
D---------------------------
A----------------5----------
E---5---7(h)---------------
Reading this example, you'd only hit the string twice with your playing hand: once, on each "5". After playing the first note, you'll quickly play the second, by just pressing the position on the fretboard. This will make the second note sound, after which you'd play the last note, by hitting the second string.
There are 5 ways, that I know of, to play the bass: Slapping, where you use your thumb to play. This makes a kind of twangy thump sound; Popping, usually combined with slapping, where you use your fingers to pull the string away from the fret board. This makes the signature popping sound; Strumming, this is the same technique used on regular guitars, where you 'strum' your fingers across the strings; Hammer-on or Tapping, where you simply press the position on the fret board ONLY; and Picking, where you play the bass with a pick.
Here's a small video that I got from dredakyst. I forgot where he got it from. It shows the guy doing some slapping, popping and hammer-ons:
http://www.brownfloyd.com/gallery/displayimage--567.html