Cheat Engine is not really a "hack" in the traditional sense. It works by scanning and altering the memory of a running program, which is why people often use it on single-player or Flash games.
Whether it goes "undetected" depends entirely on the game. Offline titles with no anti-cheat usually will not flag it, but online games with protective software can and do detect memory-editing tools, which may lead to a ban.