Websites are generally divided into 2 categories: static or dynamic.
A static website is a website where the information doesn't change. That is, if the user were to reload a static website, they would see the exact same content every time. And everyone who visits that website will see the same content every time. A static website is generally used to provide general contact information. An example of a static website is a business's website which shows information about the business, where the office is, the hours it's open, and how to contact the business by email or by phone.
In contrast to a static website, a dynamic website is one whose content is regenerated every time a user visits or reloads the site. An example of a dynamic website is a financial brokerage website. It can constantly provide you with up to-date information on your stocks and the stock markets. Every time you refresh the page, the prices of the stocks will change providing you with the most recent information. If you have an account on the website, it can show you your protfolio and it can provide the content that you wants to see. Another user will not see your content but his or her own.
Dynamic websites are more interactive and more personalize. Of course, it's also much more involved to create. Dynamic websites are made possible by using various programming languages and usually in conjunction with a database to store your information and other data.
The most popular programming languages used to generate dynamic content are PHP and CGI. Also, most sites will incorporate JavaScript which is mostly used to validate a form to make sure you have entered the correct information such as a date with a four-digit year (ie. 2002).
Corporate websites that do business on the web will used more robust programming languages such as Java Server Pages (JSP) developed by Sun Microsystems and Active Server Pages (ASP) developed by Microsoft. These websites require special software, hardware, and programmer to develop. Companies can spend millions on developing these website.
Click here to see how a dynamic websites work.