Codecs are used to encode and decode data files or streams. If a file was encoded with one Codec, the same codec is needed for decoding as well. Otherwise, the file can not be opened, viewed or played. Files are decoded for transmission or storing them.
Depending on the file in question, a different Codec Type is needed for encoding and decoding respectively. The type suggests which kind of file is encoded as well, hence why Codec Type and file type usually coincide. For example, the Codec Type of an audio file is also listed as being an audio codec. Same for video or data files, where the Codec Type is also video or Data respectively.