Codecs and Containers Explained

What are Codecs and Containers? What the difference and how do they work? In the multimedia world, Codec does encoding and decoding video or audio signals. And a container wraps that encoded video and audio alongside additional information used to identify, interleave and synchronize them.