Converting audio to MP3's is normally a 2 stage process, first the audio is recorded into a WAV format, then the WAV is then converted into an MP3. Depending on what format you wish to encode audio from, CD or direct audio, will determine what software tools you need to produce the WAV file.
If you are wanting to encode from audio input, you will need a program that will record from your soundcard's input and save the results in a WAV format. Below are some useful utilities.
Wavrec
Wavrec is distributed as part of wavplay, which can be downloaded from:-
ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/
To convert CD audio data to WAV format, sometimes known as CD ripping:
CDDA2WAV
http://metalab.unc.edu/pub/Linux/apps/sound/cdrom/
Cdparanoia
To convert the WAV file, to MP3 format:
Blade's MP3 Encoder
To play the MP3 you will need a player:
Xmms (Formerly known as X11Amp)
Xaudio
You may also need a mixer program; Xmixer works well and is included with most distributions.