If the World Wide Web merely permitted the retrieval of hyper text files, it might have still been popular, but it is the ability to define new programs to be run in the server when a request is made that really makes the Web flexible and fun. An example is an active map, where a user clicks on a map, and the place they clicked is sent to the server along with their request. The server then runs a program or script which figures out where those coordinates apply to, and, depending on where the user clicked, it sends them the relevant next page of information (see chapter 3 for an example, or section 5.6 for details of how to write active maps on various servers.).
Active maps are just one example - what you can do with server scripts is really only limited by your imagination. An interesting example is Cambridge University's coffee machine - they have a video camera pointed at the coffee pot, and a server script captures a picture of it using a video framegrabber, and sends the image to you so that you can see whether there's any coffee ready.
A standard called CGI or Common Gateway Interface has emerged for the writing of server scripts, and is supported by most servers. This means that scripts written for one server should be easily ported to another server.