Command line is a (about to use the same words in definition...) a line of command given to the operating system (shell in linux) and based on the actions specified, the os will do something.
To compile with command line on windows, you need to download mingw http://www.mingw.org/
If you are on linux, open a terminal (ctrl+alt+t) and type:
sudo apt-get install gcc
Enter password and when installation is done, type:
sudo apt-get update
To compile with linux, follow the instructions given by @ostrichparty101