Two layers
- IP (Internet Protocol) handles addressing and sending packets. Every device has an IP address.
- TCP (Transmission Control Protocol) makes sure data arrives complete and in order. If a packet is lost, it is sent again.
- Games and calls also use the faster UDP, which does not wait for lost packets.
Running out of addresses
IPv4 has about 4.3 billion addresses, and in 2011 IANA handed out the last blocks. That is why home routers use NAT: the whole household shares one public address. Its successor IPv6 has practically endless addresses but is being adopted slowly.
Ports
Several services run on one address, told apart by port number: the web uses 443, email 25, SSH 22. Ports open to the internet are a gateway for attackers, so open them with care.