El imperativo is used for commands, requests, or advice. It is not used in all forms; there is a form for tú, vosotros, nosotros, usted and ustedes.
There is a different way to form El imperativo depending on who the command, request or advice is directed to.
Have a look at some different examples:
There are different ways to express a command in Spanish, though.
If we want to express a negative command we would use "No" followed by the present subjunctive. For example:
"No corras tan deprisa que te vas a caer."
(Don't run so fast, you are going to fall over.)
Other verbal forms are use for commands, for example "the infinitive". This is very common on sign posts:
"No pisar el cesped"
(Keep out of the grass.)
"Cerrar la puerta al salir, por favor."
(Please close the door when leaving.)
Sometimes, in a more idiomatic way you can give an indirect command to someone by using "que" followed by the present subjunctive. For example:
"Que pase el siguiente, por favor."
(Next one [can come in], please.)
"Que tenga usted un buen día"
([I hope you] have a good day.)
"Que no me moleste nadie."
([I don't want] anyone to bother me.)
This last structure may sound a bit strange for an English speaker as we are starting the sentence with "que". It is as if the main clause is missing. Depending on what sort of command we are giving, they could be conveying a wish or hope, as if we were omitting "Espero que..." or "Quiero que/me gustaría que...".