The packets of one message leave the sender in order, but they do not necessarily arrive in order. Different paths, a busy link or a lost-and-resent packet can all shuffle them. So the receiver needs a way to rebuild the message.
It uses the sequence number in each header. The receiver puts the packets in order of that number, like numbered pages of a book, and then joins the payloads.
Example: the message "NETWORKS ARE FUN" is sent as four packets, 1 to 4. They arrive as 3, 1, 4, 2. The receiver sorts them back into 1, 2, 3, 4 and reads the full message. If packet 3 never arrives, the receiver can see the gap: it has 1, 2 and 4 but nothing numbered 3.