A datagram is a structured unit of data that is sent over a computer network, typically used in communication between computer systems. It consists of a header and a payload, where the header contains information about the datagram, such as the sender's and receiver's address, and the payload contains the actual data to be sent.