The command line lives in two places. It depends on how you decide you'd like to start scripting and automating tasks that are often tedious or time consuming when done manually.
First place is in the Mac OS X system and it uses Bash for the language. It's found in the Applications folder > Utilities folder > and is called Terminal.
This is similar if not almost identical to the terminal found in Linux/Unix systems.
Some resources to learn Bash scripting are:
Second place is within QGIS and it uses Python as the language.
This can be opened from the top menu by going to Plugins > Python Console and note that it currently uses Python 2 and expect that QGIS 3 when it's finished and released will likely be using Python 3 so there are some subtle but significant differences.
For python 2, some resources are:
For both python and bash, there are lots of books and examples on the internet.
To really leverage these for GIS in bash you need to get familiar with the utilities that came with your GIS packages like gdal which has several tools available at the command line for raster and vector analysis and processing.
Python has something different called modules and libraries and each brings it own set of tools and functions. For example, QGIS has it's own library called pyqgis!
I am personally more familiar with Bash and Zsh which are used at the command line or terminal in Linux. I prefer Zsh over Bash - my own personal preference.