If you are looking for what is used for, an audio codec is used for the compression or decompression of digital audio data from a live stream media or an already stored data file.
If you are looking for the purpose, the purpose of using an audio codec is to effectively reduce the size of an audio file without affecting the quality of the sound.
I really hope that this helps you with your question.