A network packet is a formatted unit of data that is sent through a packet-switched network. A packet will contain the data that is sent through the network as well as information about that data and other metadata to help route the packet through a network.
When you send an email it will be chopped up and put into packets, the actual data that makes up the email will be put within the payload of each packet and the control information in the header and trailer (like a footer) of the packet. The control information will contain information like the IP addresses of the sender and receiver, error checking information, hop limit or Time to Live (TTL), length of the packet data, etc.
When packets are sent through a network they may eventually expire to prevent packets just circulating and using up the bandwidth of the network. IPv4 packets will contain a TTL which will be a time limit before it destroys itself and an IPv6 packet will contain a hop limit that limits the number of nodes in a network it can be sent to while routing. The reason packets self-destruct is solely to prevent them ‘getting lost’ and using up the bandwidth of a network. When the receiver realises a packet is missing, or some data didn’t arrive, it will send a request to the original sending asking for the remaining data.
Missing packets are detected by using the error checking the information that is included in the packet header/trailer. This sort of information could be a checksum, a parity bit, or a cyclic redundancy check. A checksum is basically a hashed value of the entire data, so re-hashing all the received data should result in the same hash if all the data is present. A parity bit is a process of counting the number of even or odd bits in the data and adding a special bit to the data to be verified when it is received. A cyclic redundancy check is similar to a parity bit, as it runs a calculation on the bits that make up the data, but instead of counting the number of even or odd bits it runs a polynomial division and records the remainder. This remainder is then verified on the receiving side to ensure all the data was received.
Network packets follow the TCP/IP Model of transfer, which details the process step by step of how it transfers from one network node to another and what happens at each stage. Such as, within the transport layer the data is chopped up, in the network layer it is packetised, etc. The TCP/IP Model is a subset of the OSI Model of data transmission, which has more steps and more details. The OSI model is a reference model used to understand network transmission and is generally what people reference when they talk about network layers (e.g. layer 2, layer 3, etc). The TCP/IP model is another reference model but is also the protocol used for data transmission within networks.