APEX is installed on Oracle database (above 9.2 version), starting from Oracle 11g it comes pre-installed with the database. It is comprised of metadata in tables, pl/SQL code, and extensive JavaScript APIs.
The URL request from the browser is translated into appropriate APEX PL/SQL call by either Oracle HTTP Server (Apache) with mod_plsql plugin or Embedded PL/SQL Gateway. This varies by the type of APEX installation on the oracle database. After the data is processed, results are relayed back to the browser as HTML. This cycle happens each time a user requests or submits a page. The application session state is maintained in database tables.
APEX installation can be done in two ways. DBAs are more concerned about it than developers. But this determines how the URL is translated.