The Common Gateway Interface (CGI) is a standard for interfacing external applications with information servers, such as HTTP or Web servers.
A CGI program is executed in real-time, so that it can output dynamic information.
Since a CGI program is executable, it is basically the equivalent of letting the world run a program on your system, which isnt the safest thing to do. Therefore, there are some security precautions that need to be implemented when it comes to using CGI programs. Probably the one that will affect the typical Web user the most is the fact that CGI programs need to reside in a special directory, so that the Web server knows to execute the program rather than just display it to the browser. This directory is usually under direct control of the webmaster, prohibiting the average user from creating CGI programs. There are other ways to allow access to CGI scripts, but it is up to your webmaster to set these up for you. At this point, you may want to contact them about the feasibility of allowing CGI access.
A CGI program can be written in any language that allows it to be executed on the system.
CGI is rarely used in modern development as other technologies have long since superseded it.