When creating a project in IntelliJ, it needs to be configured to us an SDK (Software Development Kit). For Java this is something called the JDK (or Java Development Kit) has to be both installed and specified. The image below shows a New project window where there is no SDK configured.
To configure an SDK click the 'New...' button, select JDK and then browse for the JDK folder. The screenshots below show the typical location for Mac and PC. If the JDK is not installed, you will need to download it from the Oracle website and install it before contining
Once you have clicked OK, you can go back and create your project