I'm assuming you mean CGI as in "Common Gateway Interface", used to implement web applications, rather than something to do with Computer Graphics.
CGI is just a specification of how a program will be called when accessed by a HTTP server. The protocol is described in many places. I typed
CGI C++ into
Google and all of the first page of results were interesting and useful.
Next time you need something well-known in a hurry, please consider going to a search engine - you'll most likely get your answer in more depth, and sooner, than you will here.