Let’s start with CGI, CGI is a protocol used to connect incoming server requests from the client to the appropriate back end applications
CGI itself is a scripting language so it is able to handle some requests by itself, for example SSI – Server Side Includes