Ant is a build tool that aids compiling of Java source code. It's akin to Makefiles which are distributed with open source software. Basically, it automates the compiling of a Java application. :-)
AFAIK, Ant passes on the compiling to a java compiler (javac). so is not a replacement.
More information can be found at http://jakarta.apache.org/ant/index.html.