San Andreas predates the phone-based system of later GTA games, and its cheats behave differently in ways that still catch people out.
Entry
On PC, type the code during gameplay — there is no console and no text box. The game listens for the letters as you type them.
On PlayStation and Xbox, cheats are button sequences entered during play, not in a menu.
Most codes confirm with an on-screen message. If nothing appears, the code was not registered — usually because it was typed too slowly.
The important difference
Unlike GTA V, some San Andreas cheat effects are written into your save file. Weather changes, pedestrian behaviour and certain world states persist after saving and reloading.
This is not always reversible with the same code. Cheats that alter pedestrian behaviour in particular can leave a save in a state you cannot cleanly undo.
What can break
Some cheats prevent 100% completion. Effects that alter mission-relevant world state can make specific missions unwinnable, and the only reliable fix is an earlier save.
If you care about completion, keep a separate save before using anything beyond health, weapons or money.
The re-releases
The Definitive Edition changed some cheat behaviour and removed a few codes entirely. A list written for the original PC release is not guaranteed to match it — check which version a list was written for before assuming a code is broken.