The full form of CGI is Common Gateway Interface. It is a set of standards that define how information is exchanged between the web server and a custom script.
The Common Gateway Interface is a standard for external gateway programs to interface with the server, such as HTTP Servers.