Recording acoustic bass instruments is actually pretty straight forward: put a good mic in front of the instrument, get a level and press record.
There are several ways you can record electric bass guitars.
The sound from a bass guitar amp can easily bleed into other tracks so when recording live, consider putting the bass speaker/player in another room. While this may make him/her feel unloved, it will make for a much better sounding track on the recording. The performance may, of course, suffer so consider other options (below) as well.
If a direct output is available from the amp, record it as well. Remember that this recording can actually be sent to an amp later on to get a real amp sound with no bleeding. It's best to record both but if you only have one, the direct might be the best choice. It can still be helpful to have a bass speaker in the vicinity of the bass player since acoustic feedback will help get better sustain on the bass. You can compress the signal later but acoustic feedback helps keep the original signal alive rather than just turning up the volume on the track. This will give you a much more natural sound even on the direct channel.
If you are able to mic the bass speaker, be sure to use a mic with a good bottom end. SM57s and other vocal mics are not good choices.
Usually, a bass guitar can be plugged directly into the line input on mixing board or audio interface. There is usally a control that allows you to adjust the gain of the preamp in the mixer/audio interface. Be sure to have the bassist play some loud notes so you won't end up with distortion on the track later in the session as things heat up. This will give you a good representation of what was played but will have no compression (acoustic or otherwise) so it will need some processing in the mix.
A Direct Box converts guitar and line level signals into balanced signals that can be plugged into a balanced mic input on a mixing board or other audio interface. This is very similar to plugging the bass directly into the board but can help if you are experiencing hum or buzzing.
You can also get a great direct bass sound using a dedictate bass processor or "Bass" direct box. Sansamp makes several great Bass direct boxs with built in compression and EQ. These can be a huge help, especially if you don't have a lot of time.
Background image by Pauline Moss. at http://paulinemoss.deviantart.com/art/Stars-307119758