A compiler works in two main parts: the front-end and the back-end. The front-end takes the source code and performs lexical analysis, syntax analysis, and semantic checks to understand and verify the code. It then produces an intermediate representation (IR), a neutral form of the code. The back-end takes this IR, optimizes it, and generates machine code specific to the target hardware. This separation helps compilers support multiple machines and keep the process organized. The execution table shows these steps clearly: Step 1 is front-end producing IR, Step 2 is back-end producing machine code, and Step 3 is the final executable program ready to run.