CGI is an abbreviation for 'Common Gateway Interface'. CGI adds a lot of interactivity to your web site.
Common Gateway Interface specifies a set of standards how a web user can run programs that are located on a web server from their computer, how a web server communicates with the software program(CGI program) that resides on it and how this software talks back to the web server. Any kind of software can be a CGI program if it handles input and output according to CGI standards.
CGI scripts are commonly written in a programming language called Perl (Practical Extraction and Reporting Language). But can also be written in C+, C++, Java, Visualbasic etc.