The Finder identifies a file through its unique four character signature. The creator signature allows the Finder to determine what application created the file and the type signature allows the Finder to determine what type of document the file is . The signature of a file tells the Finder what icon to use to represent the file on the desktop and what application it should launch to open the file. By changing the creator signature of a file you can tell the Finder to launch a specific application when opening the file, providing the application supports the file type.
A files Finder flags tell the Finder certain information about the file, such as is the file visible on the desktop, is the file an alias, is the file name locked, is the file stationary, does the file have a bundle resource, does the file contain a customized icon, does the file contain any 'INIT' resources and if the file is an application is it a shared application.