Networking is divided into layers for modularity and standardization. The OSI model has 7 layers, while TCP/IP typically uses a 4 layer model. Each layer encapsulates the packet from the previous layer, adding a header. Packets are called frames, datagrams or segments depending on the layer. IP addresses are 32-bit numbers that specify networks and hosts. Subnet masks define the network and host portions. Routers use route tables to determine the next hop for packets based on the destination address.