Lame (standing for lame aint mp3 encoder) lets you encode your .wav etc into .mp3. You can use it with the comand below in a consol but are much more likely to use it without noticing in many of the graphical based ripping and encoding programs such as grip.
$ lame -h input.wav output.mp3
-h encodes in high quality
input.wav is the file you want to encode
output.mp3 is the resulting file that lame will make for you