A Script is a piece of code that automatically executes in a special runtime environment.
The main difference between a script & another form of code is that scripting languages are interpreted rather than compiled. What interpretation means is that the code produces a result from its environment, while compiling means putting the code together then executing it. Scripts execute faster and do not mess around with the core code on which its environment is running.