It's a common mistake to confuse a codec with a container as in most cases the end user sees only the container not the codec. Codecs are the information used to manipulate data where as the Container file is used to be able to identify and interleave the data.
You will mostly encounter Containers when viewing video with MOV files being the most commonly used format for movie trailers, RM used for streaming video, AVI used for a lot of older video and MKV used mainly (but not exclusively) for video that includes multiple audio tracks and/or subtitles.