Typically you will use either a Perl/CGI script, a PHP script or an ASP script.
What happens is you tell the form to use the form handler when the submit button is clicked.
The form handler then processes the information the site visitor typed into the form fields and turns them into the body of an email, which is then sent to your email address.
Before we get into this in a big way, I have to point out that if your have FrontPage available to you and if the web server you upload to support FrontPage Server Extensions you could generate your contact form in seconds.
FrontPage has its own form handler built in as a server behaviour (extension) and all you do is tell it where to send the form results (email, database etc) and fill in the blanks. Publish the form from FrontPage and that's it.
Assuming you don't have FrontPage, you will need to configure a form to email handler manually.
Jack's Script click here
Matt's FormMail click here
Matt's Script Archive click here
General form handlers in any language can be found at the excellent Hotscripts.com site click here
Just click on the language you want to use and run a search for form handler.
A lot depends on where the site will be hosted and what the web host offers in supported features. Some hosts will allow you to run your own CGI scripts while others will not. Likewise, some accounts support PHP while other support ASP and still others support neither.
You need to do a little homework with your web host prior to choosing a suitable script.
Good luck with it.