You can also build interfaces to search databases or index files (also called gateway applications, or write scripts to gather information entered by users (forms processing.)
CGI programs can be written in C or C++, VisualBasic, PERL, or other computer languages. PERL (Practical Extraction and Report Language) is the most used language for CGIs, because it is very powerful and relatively easy to learn. See, for example, the Teach Yourself CGI Programming with Perl in a Week page.