afconvert is a command-line utility that uses Core Audio to convert audio files from one format to another.
The manpage is actually pretty sparse (like the rest of the Core Audio documentation); you’re better off reading the command-line help:
% afconvert -h
A simple example is to convert an AIFF file to AAC in an MPEG-4 file:
% afconvert -f 'm4af' -d 'aac ' -b 98304 Recording.aiff
The resulting file is 96 kbps (98,304 bps) and is named “Recording.m4a”.
UPDATE 2008-11-26: Corrected permalink and title to include the section number.