Mapserver mapscript is a wrapper around the mapserver APIs that exposes them to a host programming language. Supported programming languages are: Python, Java, C#, Perl, Ruby, Tcl. PHP is also supported, it only differs from the others in how the API is exposed to the PHP interpreter.
That being said one of the ways you could invoke mapscript is by creating a script which simply emulates the behaviour of a standard, Mapserver-backed, WMS service.
There are some examples here:
http://mapserver.org/ogc/mapscript.html
There are several reasons for doing this: interpolation of results or input params, alteration of the resulting image, caching, accounting, etc.
If instead what you are aiming for is using a scripting language to dynamically alter your mapfile depending on certain conditions you can of course achieve that through mapscript, but you should also know there is effort underway to embed a javascript interpreter in Mapserver for this very purpose.
Note: this feature is limited, not complete and still experimental, YMMV.