What is CGI used for?
When your browser requests a CGI file it is, in effect, requesting that the server runs that particular CGI program. Different CGI’s do different things: search a group of files for a keyword, send the contents of a form to a email address, take the information from a form and add it as a entry in a guestbook, etc.