Beginning with System 1, Macintosh operating systems have attached type codes and creator codes as part of the file metadata. These four-character codes were designed to specify both the application that created the file (the creator code) and the specific type of the file (the type code) so that other applications could easily open and process the file data.
The system uses creator codes and type codes in file metadata to help other applications understand the origin and nature of a file.