To open the console, you first need to enable it through the settings menu. You can do this by clicking Options in the top right corner of the screen from the main menu, selecting Game Settings, and choosing Enable Developer Console. Set it to “yes.”
The default key binding for the console is the tilde key (~). But if you want to change it to something else, head to the Keyboard / Mouse settings, and scroll down to Toggle Console and click the right-hand box to choose your binding. There’s absolutely nothing wrong with using tilde, but the F-keys are a sensible alternative.