In the "old" days of the web this was almost exclusively performed using a combination of C programs, Perl scripts and Shell scripts using the Common Gateway Interface (CGI). Those scripts were executed by the operating system, and the results simply served back by the web server. Nowadays full in-line scripting languages such as ASP and PHP have been developed that are executed by the web server itself, or by extension modules to the web server. Either form of scripting can be used to build up complex multi-page sites, but direct execution usually results in lower overhead due to the lack of calls to external interpreters.
Dynamic websites are also sometimes powered by custom web application servers, for example the Python "Base HTTP Server" library, although some may not consider this to be server-side scripting.
See also content management systems (CMS).