AAC or Advanced Audio Coding is an audio file format with losses. It was designed in 1997. as an MP3 successor with improved encoding quality. Its main advantage and difference from MP3 is a great efficiency of encoding at both constant and variable bitrates.
AC3 or Dolby AC-3 is a data format file where six audio channels are compressed by the AC3 codec, also known as Audio Codec 3. The AC3 format is used for the following audio formats - DVD, Blu-ray, cinemas and game consoles. To play the full surround sound of the AC3 file signal, you need a device that supports Dolby Digital technology.