In many computer languages, the programs come in a form known as "Source Code". This code is (mostly) human readable, but not directly usable by the computer.
A compiler, which is often part of an IDE, takes this code, and performs a set of operations on the code to turn it into executable (runnable) software.
It is worth dividing the lifecycle of a compiled piece of software between compile time and run time. Compile time refers to processes which occur during compilation, and thus never need to occur when the software is started. Run-time refers to operations which occur when the program has been compiled, and is now running. Run-time operations will occur every time the software is run, and compile-time operations will occur only when the software is compiled.
This normally consists of a set of processes
The exact operation of these steps may be different depending on the brand of compiler, or the language being used. For example, the Java compiler does no Linking, and not a lot of Optimisation, and does not really have a preprocessing step, as everything in Java is dynamically linked. A lot of these operations therefore occur at run time, although parts of the code may be optimised during run time.
The classic example for compilation is the C language. Most C compilers will go through all the above steps. Probably the best known C compiler is GCC, and because of its OSS nature, curious readers can actually examine the code and see how it does these things. One very curious thing, is that GCC can, and is used to compile GCC from its source.
Time to build your own robot! Using a Raspberry Pi with parts and some time, you can use my book to learn how to make and program a robot with automatic behaviours.