Robocode is an open source project available on Source Forge. To install Robocode, download the Robocode setup jar file to your local machine: https://sourceforge.net/projects/robocode/files/latest/download?source=files
Then run the downloaded jar file to install the robocode application.
Readme file: http://robocode.sourceforge.net/docs/ReadMe.html
The Robowiki site contains tons of useful information.
Robowiki: http://robowiki.net/
Getting started, which covers running your first battle using sample tanks: http://robowiki.net/wiki/Robocode/Getting_Started
Creating your first robot: http://robowiki.net/wiki/Robocode/My_First_Robot
How to use the Eclipse IDE to create robots: http://robowiki.net/wiki/Robocode/Eclipse
Documentation (javadocs) for the robocode classes is installed during setup and is available from the robocode application menu. Alternatively, the javadocs are available on SourceForge: http://robocode.sourceforge.net/docs/robocode/