If you have a mic, and you want to Record the sounds near your mic, you will need two programs: arecord and lame.
sudo arecord -f S16_LE -c1 -r44100 -t raw -d 600 | lame -r -s 44.10 -m m -b 128 - test.mp3
Short explanation:
the arecord software records in signed 16bit little endian at 44100 hz and outputs in raw format, then lame transforms it to a mp3 file at 128kpbs and 44.1 khz. the -d parameter represents 600 seconds (10 minutes) recording time until it stops. for more info read the manual on both programs:
man arecord
man lame
You can playback the test.mp3 file with mpg123 like this:
sudo mpg123 test.mp3
if this doesn't work on first test, try adjusting your alsamixer.