The HUD will disappear and you will get a prompt (- |) in the lower-left corner of the screen where you can input commands as listed below (The console will also remember any previously entered commands, which you can scroll through with the Up and Down Arrow keys). In order to access the console, you will need to use the key appropriate for your language (as shown in the list of console keys). After restarting Fallout 4 pressing the equivalent button from above will open the console. Should this for some reason not work, you can always set your keyboard's language layout to US in the Windows control panel. It cannot be used in the game console versions or in Survival mode.
It is useful for altering content while in-game, but may be used to cheat as well. The console is a debugging tool in the Windows version of Fallout 4.