A data packet can either be a chunk of your game, some code, a specific file, or any random data you want to send to someone. So for your game, this’ll be the data of your game’s sessions (for example, a player’s position, what actions they take, etc).
Data packets help send your game’s sessions across the internet
It’s mainly due to bandwidth. Those copper wires and fibre optics only have so much room to carry your files. The bigger and better the bandwidth, the more data packets you can send. Having low latency helps, as this means those packets can travel faster, too.
Each packet is wrapped with metadata
All of that data lumped together is wrapped in meta data – instructions for how the data should be handled and put back together on the other side.