Here is a nice example of a Makefile and its explanation line by line.
You execute makefiles from the CLI (mostly in Unix-like systems, as far I know) using the
make
command, and they are normally written for automating tasks during a program's compilation-time.