(I asked this question on Gaming, but was closed and ppl suggest I ask on Stackoverflow. If this doesn't fit here, please suggest a better place before you close it. Thanks.)
One general way to cheat in game is to use a memory scan tool to track down the value you want to change. However another common way to cheat is to modify the binary file.
For example, in a game you get +5 exp when you kill an enemy, and by changing 5 to 50 stored in binary you can get +50 exp. As far as I know, many iPhone game cheats work that way, which requires you to patch a binary file or use HEX editor.
I'm interested in how those hackers locate the settings. What is the general method/tool to find out which binary file a specific value is in and the corresponding offset? If it's a very unique number or a ascii string, like 3219 or google.com, you can just search the HEX value, but what if it's a common value, like 1?