The router enables internet access for all machines on the LAN by serving as a gateway, connecting the LAN to the internet. It manages the flow of data between devices within the LAN and the external internet, allowing seamless communication.
The router is also a host that moves data from one network to another i.e. from WAN to LAN or vise versa.
As router is connected to both LAN and internet also each host device on LAN have same access rights so machines connected to LAN can also access internet using router.