FrontController class

The FrontController class class searches through a list of routers, provided by the RouterList class, until it matches one that can process a request.
When the FrontController finds a matching router, it dispatches the request to an action class returned by the router.

If the FrontController cannot find a router to process a request, it uses the default router.

<action-name> - specifies the action class to execute on the controller class

The standard router parses this URL format and matches it to the correct controller and action.

Default router

The default router, defined by the DefaultRouter class, is the last router Magento checks during the routing process.
Requests that reach this point often contain invalid URLs that previous routers cannot handle.

routes.xml

The routes.xml file maps which module to use for a URL with a specific frontName and area.
The location of the routes.xml file in a module, either etc/frontend or etc/adminhtml, specifies where those routes are active.

This configuration tells the FrontController to look for actions in the OrangeCompany_RoutingExample module before searching in the Magento_Customer module.
If app/code/OrangeCompany/RoutingExample/Controller/Account/Login.php exists, it will use that file for processing the login route instead of the original class.

Action class

Action classes are extensions of the Action class that a router returns on matched requests.
The execute() function in these classes contain the logic for dispatching requests.

If you need to forward a request to another action in your class, use the _forward() function.

Example:

$this->_forward('action','controller','Other_Module')

Use the ActionFactory in your router to create an instance of an Action class.