Wrapping, layer by layer
Your web browser wants a page from a computer on your home network. At the top of a stack of four layers, the application layer writes the request: 38 bytes of plain text. This is the data.
The data goes down one layer. The transport layer (TCP) puts it in an envelope with a 20-byte header: port numbers that say which program it is for, and a sequence number (where these bytes sit). Now it is a segment.
The internet layer (IP) wraps the segment in a bigger envelope. Its 20-byte header holds the two IP addresses, 192.168.1.20 to 192.168.1.30, so the packet can find its way. Now it is a packet.
The link layer (Ethernet) adds a 14-byte header with two MAC addresses, the hardware names of the network cards. It also adds a 4-byte check code at the end, the FCS. Now it is a frame.
On the wire
The network card turns the frame into bits: 96 bytes become 768 ones and zeros, sent down the cable as electrical signals. The cable does not care what is inside.
Unwrapping
The receiver's link layer checks the FCS to make sure no bit flipped, and sees its own MAC address. It removes the header and the check code, and passes the packet up.
The internet layer reads the IP header. The destination 192.168.1.30 is its own address, and protocol 6 says TCP is inside. It removes the header and passes the segment up.
TCP checks the sequence number, then reads destination port 80: that is the web server program. It removes its header and hands over the data, exactly the 38 bytes that were sent.
The big picture
You may also meet the OSI model, which splits the same job into seven layers. Its top three fit inside the application layer, and its bottom two inside the link layer. Engineers still say "layer 2" and "layer 3".
Each layer does one job and reads only its own header. So one layer can change without touching the rest: swap the cable for Wi-Fi and only the link layer changes. IP, TCP and the browser never notice.
The headers, field by field
;; step 1/10 · write-message · data 38 bytes APPLICATION (HTTP) data "GET / HTTP/1.1\r\nHost: 192.168.1.30\r\n\r\n" size 38 bytes no header of its own at this layer: HTTP is the message
Not shown: the TCP connection was opened first (the three-way handshake), and the sender found the receiver's MAC address with ARP. On the cable each frame is also preceded by 8 bytes of preamble and start-of-frame delimiter, and frames are spaced by a 12-byte gap.