In addition to HTML, you can use PHP and CGI anywhere in your site. These allow you to add dynamic content to your site. These are huge topics, so you may want to find a book or tutorial on CGI or PHP. For people familiar with CGI, you may be pleased to hear that you do not need to restrict CGIs to a cgi-bin directory; just name the script with a .cgi extension. CGIs run as the http user; you should set your permissions accordingly.
Please be careful running CGIs; while the system is designed to prevent many security problems in this area, it can still be risky, and should be approached with caution. Ask for help if you don't know what you're doing. And, they will be monitored, so if you're using up too many resources, you may have to change your code!