A container is a wrapper that bundles audio or video data together with metadata such as track titles into a single file. M4A, WAV, AIFF, and Ogg are container formats you meet often with audio. Containers and codecs have different jobs.
What it holds
Besides the audio data, a container can store the track title, the artist name, album art, chapters, and timing information. Which information and which codecs it can hold differs from container to container.
How it differs from a codec
A codec is the mechanism that compresses and decodes audio. AAC, for example, is a codec, while M4A is a container that often holds AAC. Ogg is the wrapper and Opus is the codec that goes inside it. WAV generally holds PCM, but the idea of separating the wrapper from the contents is the same.
The extension is only a clue
Extensions such as .wav, .m4a, and .ogg are clues to what kind of file you have. Even with the same extension, however, the internal settings and metadata can differ. Check whether what the other side needs is M4A or AAC at a specific bitrate, and look at both in the export dialog.
Compatibility depends on the container and its contents
Playback devices and editing software must support not only the container but also the codec, the sample rate, and the channel count inside it. Being able to convert does not guarantee that the other side can play it. Check the recommended specs of the client, the streaming service, or the video editor first.
Make files for each purpose
Choose the combination of container and codec by purpose: PCM in WAV or AIFF for production and handover, MP3 or M4A (AAC) for sharing, FLAC for archiving. Keep the original file and create the combinations you need separately. You can convert to each format with the audio format converter tool.
