Learn the engine, learn the game. There's nothing like a universal hack that you can apply to every game. Every game is different and every game needs to be learned. To modify a game's engine/hack a game you need to study how it works. Read it's documentation (if any) break it open in your debugger and start digging through the code. Make a drawing/image of how the game works and think of ways to modify this behavior to suit your needs.
I know this sounds very generic, but then you ask a very broad and generic question