The commands you type are not sent to the system until you press Return. If you type a command incorrectly, but do not press Return, you can correct your mistake in the following ways.
Press the Delete or Back Space key to move back a space to the error; or
Type Ctrl-U to erase the entire line and start over. Hold down the Control key and press u.
Try both of these methods and see how they work. The Delete/Back Space key varies on some systems. Ctrl-U should work on most systems.