Ant is like "make", only for Java programs. It allows you to create complex compiles, and will also only compile what is new. For instance, I use it to keep my source files and class files seperate in all my projects. I also create jars in what would otherwise be a massive headache, as I need to include other jars within the created jar (you have to unpack and include the class files, you can't simply include a jar within a jar).
The manual is a bit confusing, but if you stick with it you can usually figure out what you need to know.
Here is the manual page on creating a jar in Ant, and it includes examples.