I had been reading through the next: http://modules.apache.org/doc/API.html

Please let you know that Apache knows the title from the handler to call. The CGI Module has got the following handlers:

int translate_scriptalias (request_rec *);
int type_scriptalias (request_rec *);
int cgi_handler (request_rec *);

Another module may have another names. So how exactly does Apache know the handler for that (let us say) response phase ?

PS: Can someone assign the best tags ? I could not know which of them to add.

They are (eventually) people from the module struct at the end from the first snippet.