Before you can start having fun programming in Java, you need to download and install the Java SE Development Kit. The JDK is the most important Java download you can make because once it's installed your computer will be able to understand and execute the programs you create.
Note: If you are a Mac user you do not need to download the JDK, instead read this guide on Java and the Mac OS X.
The JDK can be found on the Oracle Java downloads page. In the Java SE downloads list the latest version of the JDK can be found at the top. Click on the "Download JDK" button to start.
The download and install process is fairly straight forward. You can't really go wrong by following the prompts as they appear, as you can see if you look at the rest of the steps in this article.