With a wireless router, multiple computers can share a single Internet connection. To do that, the router provides two core networking features. It serves as a gateway to the Internet, directing all traffic to and from the Internet to the right locations through the router's wide area network port. It also establishes a local area network that joins the computers connected to the router in a network so they can share resources such as files and printers.
One of the Ethernet ports on the back of a wireless router usually has a different color or is otherwise set apart from the others. This is the WAN port that you must connect to your modem to access the Internet. The router claims the single public IP address your Internet service provider assigns to you, and it provides security features such as a firewall with port forwarding and quality of service, which prioritizes Internet traffic. Some specialized routers have two WAN ports that connect to different modems, usually from different ISPs, in case one of the connections fails.
Each of the computers that connects to the router, either through a wired or wireless connection, is joined in a LAN. Computers on the same LAN can usually see each other to share files and printers. Each computer's security configuration controls what the computer shares, and many routers enable you to block LAN computers from seeing one another. The router assigns network addresses automatically to each computer when it joins, or you can manually assign network addresses. On many routers, you can classify the router as a router instead of a gateway and reassign the WAN port to a LAN port through the router's firmware. Other advanced networking features provide the ability to create multiple virtual LANs rather than a single LAN for all computers.
There is no hardware difference between a WAN and a LAN port. All the router's functionality is provided by the software that controls the router, which is called firmware. If the firmware that a router's manufacturer supplies doesn't enable you to configure advanced networking features, you can usually install third-party, open source firmware that provides complete access to the router's full capabilities (links in Resources).