ZAP Command Line
ZAP is mostly executed from the GUI, but ZAP can also be executed from the command line. This is great if you want to run a quick scan on your target or want to automate it. If you haven't read How to use OWASP ZAP - Open Source Vulnerability Scanner, I suggest you read it first to have a better understanding of ZAP before moving on to the command line.
ZAP Command Line (CLI)
Executing ZAP from the command line is limited as you will not be able to specify anything using the command line arguments alone. This means you may not be able to use other scanning features such as fuzzing, ajax spidering, brute force, etc.
You can specify some variables by using the -autorun command with an automation file from the automation framework. You can read more about that in How to Autom...