it will depend on your setup. you can either use a soundcard with jack input on it or an interface like the tascam us-122 which connects to your computer by usb or firewire cable. these interfaces have mic and line/guitar inputs, so you can either mic your bass amp, or just plug straight in to the line/guitar jack input. the tascam range are fairly cheap as interfaces go and have been well-reviewed.
personally, I'd go with a usb/firewire interface like the one mentioned, since it has a built in pre-amp. plugging in via a soundcard can sometimes lead to a quiet signal from basses/guitars being plugged straight in. plus, interfaces generally have a line/monitor output and headphone output, so you can listen to your garageband mixes (and often they'll have separate volume controls for both of these options, so you have more felxibility). if you have a decent set of monitors, you can also hook things up so itunes and your dvd player also play through your monitors (to do this, go to system preferences on your mac, then go to 'sound' and set the 'sound output' to your interface).
either way, you'll need to install the related drivers and then check that garageband is recognising your sound input. do this by entering garageband, clicking on the 'garageband' dropdown menu and go into 'preferences.' from there, click on 'audio/midi' and make sure the audio in and audio out sections both list whichever input and output source you're using.
hope this helps.