A JAWS script is merely a bridge between the screen reader and the mainstream application. The script does not change the application itself but, rather, helps JAWS extract information from the application that it needs.
A script can make an ill-behaved application speak more easily and naturally for the user and can also provide functionality that previously did not exist. For example, you can use scripts to build hot keys to read any part of the screen and to move to parts of an application that are not navigable using keyboard commands. These are only two examples of how scripting can be used to make an application more accessible.