HTTP is an application layer protocol. In the layers under it segmentation/fragmentation can occur. The basic idea is that if the layer below can't handle the packet size it should be split to smaller packets, with some way to reassemble the packets together in the correct order.
With TCP (which http uses), if you try to send a really long message it will be split into segments, and the reassembly is done with according to a sequence number that marks how far in the data stream the content of the segment belongs.
With IP (v4), you have fragmentation with the fragment offset and the more fragments flag in the IP header. Each fragment but the last is sent with the more fragments flag, and the fragment offset is their order.