Grand Theft Auto V does not have one cheat system. It has three, and they do not overlap. A code that works on PC will do nothing on a PlayStation, and the reverse is equally true. This is the single most common reason a cheat "does not work".
PC: the developer console
On PC, cheats are typed. Press the tilde key — ~, usually just left of the 1 key — to open the console, type the cheat, and press Enter. On non-US keyboard layouts this key is often labelled differently; look for the key in that position rather than the symbol.
PC codes are words, not button sequences. If a list gives you something like UP, UP, X, SQUARE, that is a console-platform code and it cannot be typed.
PlayStation and Xbox: button combinations
On console there is no console window. Cheats are entered as a sequence of button presses during normal gameplay — not in a menu, not while paused. The sequence must be entered quickly; leave a second between presses and the game stops listening.
You will get no confirmation message for most codes. The effect either happens or it does not.
The in-game phone
The third method is the phone. Open it, dial a number, and the effect applies. This works on every platform, which makes it the most reliable of the three — and the only method where you can check what you typed before committing to it.
Phone numbers persist in your call history, so a code you use often can be re-dialled from the list rather than re-entered.
Why cheats do not save
Cheat effects in GTA V are not saved with your game. Reload, and everything resets. This is deliberate on Rockstar's part and is not a bug — plan around it rather than trying to work past it.
The achievement question
Using cheats in GTA V disables achievements and trophies for that session. The block lifts when you reload without cheats active, so a single cheat does not permanently damage a save file — but anything earned while a cheat is active does not count.
If you are working towards completion, keep a separate save for messing about.
Online
None of this applies to GTA Online. Cheats do not work there, and attempting to force them through third-party software is how accounts get banned. Every code discussed here is single-player only.