Answer:
Parsers to identify the file format.
The OS to determine the file format.
Step-by-step explanation:
The answer I gave is my best guess. The base of this question doesn't make sense because magic numbers can be used by several different things, so there is a broad range of answers for this. But Typically magic numbers are used to identify a file's validity or it's format