It depends entirely on what you are doing. Editing a single-player game on your own machine is generally a question of terms of service rather than criminal law, though it can break the game or void support.
Using tools like Cheat Engine against online games, or to break into systems and accounts you don't own, is a different matter. That crosses into unauthorised access, which is illegal in most jurisdictions, and it will almost certainly get your account banned.