How does it work?
While our definition is good, you probably want to understand what this process looks like in a little bit more detail. How do we actually make computers do stuff we want?
We do that by writing commands for them in programming languages. Unlike natural languages, which are usually very flexible in their structure and word order, programming languages are written languages with a very strict syntax. A programmer who learns this syntax will be able to use it to write commands for basically anything.

But the thing is, computers don't understand the syntax programmers use. Computers only understand so-called machine language, a set of instructions hard coded into the hardware itself. There are very simple instructions, like "move this bit from this memory location to that memory location" or "add this number to the number on this memory location." The problem is, it would be very difficult to write a complex program if we had to use a language that needed our precise instructions for operating on memory like that. We would be repeating ourselves all the time and having to write lines and lines of code to simply compute one equation.
Instead, we use compilers. Compilers are programs that translate from the higher programming language that the programmer is using into machine code that the computer understands. These translation tools are the foundation on which the entire IT industry relies.
Compiled programs (executables) are usually thoroughly tested for any errors or unexpected behaviors.