On a dynamic website there are client-side and server-side scripts. Client-side and server-side are sometimes referred to as front-end and back-end. The client-side of a website refers to the web browser and the server-side is where the data and source code is stored.
Different types of processing can occur at each side.
External scripts are sent to the client from the server when they are requested. Scripts can also be executed as a result of the user doing something like pressing a page button.
A server-side script is processed on the web server when the user requests information. These kinds of scripts can run before a web page is loaded. They are needed for anything that requires dynamic data, such as storing user login details. Some common server-side languages include PHP, Python, Ruby and Java. These execute like programming languages on the server.
When a server-side script is processed, the request is sent to the server and the result is sent back to the client. This is useful for websites which store large amounts of data, such as search engines or social networks - it would be very slow for the client browser to download all the data.