As far as command line interface I would imagine he is talking about a console application, not necessarily taking arguments from the startup params.
State machine diagrams essentially show the different states and which states can transition to other states. You can use something like WhiteStar UML to draw them.
For a vending machine you can have the following as the main states:
The four states are Off, Idling, Processing Request and Maintenance Mode. Essentially Idling is waiting for a product selection to be made - once made it would change state to processing request. The Idling state splits into a substate and could look something like this:
Just like how the Idling splits down to a substate the processing and maintenance would as well. You can have as many layers of states as you want depending on the complexity of the system. Here is processing request for a 'smart' vending machine that would accept different payment types:
Any questions?