Cross-compilation is when you write code on your computer (host) but want it to run on a different device (target) like a microcontroller. You use a special compiler on your computer that makes code for the target's CPU. After compiling, you copy the program to the target device. Then you run it there. The program can't run on your computer because it's built for the target's hardware. This process involves writing code, compiling for target, transferring, and running on target. Variables like source code stay the same, binary changes from none to created, transferred, then executed. Output appears only after running on target. Understanding these steps helps avoid confusion about where code runs and why transfer is needed.