"Explaining the difference between codecs and containers is relatively simple, but hard part is attempting to understand each format. The lines start to get blurred when you realize that most common codecs aren’t exclusive, and can make use of multiple compression technologies in order to get the job done. The blurred line becomes nearly invisible when you start to talk about formats like MPEG-4 which could be classified as a bit of a container and a bit of a codec, but that’s a rather complicated classification that’s best left for another time..."
Via Terheck
Very clear and understandable article. A must read If you're interested in videos codecs, containers and compression.