A compiler is a special program that processes statements written in a particular programming language and turns them into machine language or "code" that a computer's processor uses.In a computer operating system , a loader is a component that locates a given program (which can be an application or, in some cases, part of the operating system itself) in offline storage (such as a hard disk ), loads it into main storage(in a personal computer, it's called RAM ), and gives that program control of the computer (allows it to execute its instructions ).
Compiler: Compiler is the program that is used to check the format and syntaxes and then translate that code into another language. It is usually used to translate the file into executable format.