It's not necessarily a cgi script, more just the way you tell the webserver to handle the request.
In the simplest example, you tell the webserver, to use a certain script as your index file.
In the example for perlmonks, it seems there is an index.pl there, which is handling the request by default.