You can download NearInfinity from SourceForge here: http://sourceforge.net/projects/nearinfinity/
The source code and a simple make file are included in the jar file. If you want to compile NearInfinity yourself, you need to have a few GNU utilities installed (at least make and find) and the java 1.5 sdk. The simplest way (IMO) on Windows to do this is to install Cygwin.
If you want to do some development/hacking, I highly suggest you use CVS. See the appropriate topic on that.