Maybe the code gives you a shortcut around the playing field, or maybe it helps you get your hands on a useful tool without having to stumble upon it. The cheat itself could be lots of different things. This is where the 'cheat' part of cheat codes really comes into question. Either way, doing so will unlock something previously hidden in the game.
To accomplish this, you either enter the code manually or execute a series of actions during gameplay. The traditional cheat code is one that you can enter while playing the game.
So before we bang the gavel and declare cheat codes either cheating or fair play, let's discuss what a cheat code really is. What if we called them 'shortcuts' or even - as we might see - 'bugs'? Suddenly, we're not necessarily cheating - we're just taking advantage, instead of stealing an unfair advantage. But let's keep in mind that semantics might make a big difference here. So, yeah, a cheat code is cheating, because you're breaking a rule that others have to adhere to, right? Follows logic.
'Cheating' means gaining an unfair advantage, after all, usually by breaking some kind of rule. For most nongamers, the question of whether cheat codes equal cheating seems pretty simple.