Open the game's configuration utility and scroll to the game options section, then add the line Enablecheats=1 and save.
In game, press the key beneath Escape — the tilde key on most keyboards — to open the console. Be aware that the console is invisible while active: you can see what you are typing in the moment but not the finished line once submitted. That makes accuracy essential, because a mistyped code simply fails without telling you why.