A router or some type of gateway breaks incoming packets into smaller pieces during transit.
Each network has its maximum transmission unit (MTU). The value of ther MTU depends on the type of network and protocols it is using the MTU declare the largest possible packet that is allowed to be sent on the network and is always respected by all hosts and devices that transmit data on that network.
Host A reside an Network A, which has MTU of 1500. Host B on the other side is port of network b where the MTU there is 1400.
Host A generates a packet with size of 1500 bytes which is equal to the network’s MTU (1500). When the packet transits the router that connects the network the router knows that network B MTU is 1400 bytes so it needs to split the 1500 byte packet into two smaller packets and transmits them on the network so it creates the first packet which is 1400 bytes long and then sticks the reset of the original packet into the second packet which is just 100 bytes.
When host b receives the packet it will realize it needs to assemble the two packets in order to retrieve their data.