Packet hacking can be done several ways...
One of the easiest ways is by creating a proxy. You start by changing the IP the game connects to, to your local machines ip (127.0.0.1), and then having an application that intercepts all the packets from and to the game. Which allows you to send and receive packets...
The more complicated way is by hooking/injecting directly to the game, and using the games own calls to send and receive packets. This is also the best way because you will be able to use the games own packet send/recieve functions for encrypted packets...