Format - specifies the actual internal structure of the file - ie how the data is stored in the file.
Codec - short for Compressor-Decoder - the 'program' that takes the data and manipulates it in such a way as to take up less space in the file - compression, then when the file is read the data is restored back to its full size - decoding
Container file - a standad format file, sometimes known as a 'wrapper', which can contain other format files - eg MOV and MP4 are container files and can contain files encoded with for example the h.264 or Mpeg-2 codec.