There are web applications that must always run on the server in order to work, create open port/socket we usually reverse proxy via Nginx or Apache later.
But there also are applications that do not run unless resource is requested or cron job is triggered. Most commonly PHP sites.
How can be call this two types to distinguish them?
Maybe you are talking about CGI scripts? With CGI scripts the web server will start a new process for each request. PHP can run as php-cgi, but nowadays mod_php and php-fpm are more common. CGI scripts can also be shell scripts or compiled programs.