Audio files come in a number of different formats. Some are lossy, such as AAC and MP3; they save space compared to the original files, but some of the original data is lost during compression. Some formats are lossless, such as Apple Lossless, FLAC, and SHN; these files can be converted back to their original form without the loss of a single bit. Finally, some are uncompressed, such as WAV and AIFF; they represent the exact data from a CD or a master.
If you've bought music from the iTunes Store, you'll have AAC files at 256 kbps (that's kilobits per second, an indication of the quality of the compression; higher numbers are better). If you've purchased from Amazon, you'll have MP3 files, most likely in VBR (variable bit rate compression), so the bit rate you see will be an average. Files from other sites may be in FLAC or even WAV format; the former is the most common for lossless files, notably from sites that sell live or classical music.
There may come a time when you'll want to convert some of your audio files to a different format. Depending on your originals, and the reason for the conversion, there are different ways you can do so.
Use iTunes to convert your audio files
One reason to convert files to another format, or even another bit rate, is to save space. You can have iTunes convert music files to 128-kbps AAC when syncing to an iOS device if you wish, for example. This often makes sense if your device has limited storage and/or you listen to your music outdoors or on the go, where a difference in quality (say from 256 kbps to 128 kbps) won't be very noticeable. Just check the Convert Higher Bit Rate Songs To 128 Kbps AAC option on iTunes' Summary screen for your device when it's connected to iTunes, and the process will happen automatically when you sync. (Note that such a conversion can take a long time if you have a lot of files to convert.)
But you can use iTunes to convert in other ways as well. iTunes supports AAC, Apple Lossless, MP3, AIFF, and WAV files. You can convert to or from any of these formats as needed. Say you have some AAC files you bought from the iTunes Store (DRM-free, as all recent iTunes music comes) and want to play them on a device that only supports MP3 files; iTunes can do this for you. Here's how:
Find the files you want to convert and add them to a new playlist. Open iTunes' preferences, click on the General icon, then click on the Import Settings button near the bottom of the window. This shows your current CD-ripping settings (which also apply to conversions made with iTunes). You can then make changes to these settings--for example, if you want to convert your files to MP3 format, choose MP3 Encoder from the Import Using menu. Choose a bit rate from the Setting menu. You should never choose a higher bit rate than your original files; your music won't sound any better. But you can choose the same bit rate, so if you have 256-kbps AAC files from the iTunes Store, choose Custom from the Setting pop-up menu, and then set the Stereo Bit Rate pop-up entry to 256 Kbps to make sure you don't lose any quality. (Converting from one lossy format to another will result in a very slight, but not noticeable, loss of quality.) Click OK several times to to save your settings and to close the Preferences window.
Back in your playlist, select all the tracks then choose Advanced -> Create MP3 Version. (If you have chosen a different format, its name will appear instead of MP3.) iTunes will convert your files, and you can search for them in your library when it has finished. (Hint: Sort you Music library by Date Added and those files will float right to the top.)
Use another app to convert your files
There are a large number of file formats (see the most common ones in the "A Plethora of Formats" table), many of which iTunes doesn't support--notably FLAC, Shorten, and Ogg Vorbis.
So what can you do if you have files in one of these formats and want to add them to iTunes? There are a number of programs that can convert audio files from one format to another. tmkk's free XLD is my tool of choice, as it manages every audio file format I've ever come across, along with some I've never heard of, and even supports cue files. Stephen Booth's free Max is another tool that converts many audio file formats. And if you have Roxio's Toast 11 Titanium (and some earlier versions), you can convert from FLAC or Ogg Vorbis to iTunes-friendly formats.
With all three of these programs, conversion involves choosing an output format and bit rate, and dragging the files you want to convert onto the program's window or icon. (With Toast, click on the Convert tab, then choose Audio Files from the popup menu near the top of the window.)
If, for example, you've bought some music in FLAC format, and want to listen to them in iTunes, use XLD or one of the other programs to convert them to Apple Lossless; since both formats are lossless, you'll have exactly the same data in the resulting files. (Converting from one lossless format to another does not result in any change in quality.) And you'll retain any metadata in the original files as well.
Once you've decided on what format you want to use, the bit rate and other settings, converting music files is a drag and drop (and wait) operation. With these tools, you'll be able to convert any audio files into the format you need.