It signals the end of a code statement. It isn't technically required in GML but best practice is to include it for readability.
It can also signal things like the parts of for() statements, where the first part is the variable to use, 2nd part is the condition, 3rd part is the change. In this case, the semi-colon is NOT optional.
There may be another usage but I can't remember off the top of my head.