Basically, a script is a bunch of code which is designed to impact gameplay. It makes things appear, change, disappear and act/react in certain ways. Depending on the game, scripting can either be very limited or very comprehensive.

Age of Empires 2, for example, had a series of Single Player objectives in each level of its campaign. Upon completion of these objectives, events would take place, like text messages, scrolling to view a different area, gifts of resources or units, or even beating the level entirely. These would be written into a script, which is read by the program and interpreted (if written properly) into the desired effect.