This command forms a delay of one game tick, which is actually a very short period of time. Why wait would you say. Well sometimes a whole line of commands in a row will get a bit clogged up and especially if your connection is a bit laggy, you might find that some commands in your script have been skipped or lost. If your script is malfunctioning, remember to try and put some waits in. They can be considered the oil of a script.
More waits generally make it run smoother.
Waits can also be used to actually put some time in between commands. However, since a wait is a very short time, you are advised to make a longwait, as discribed in the Easy Scripting section below. There are three special types of scripts that can be used to fulfill your advanced scripting needs. The first is the toggle script. This type of script can be used to switch a certain setting on or off with only assigning one key to it.