On the command line, in the directory containing your build.xml file.
If you don't have a build.xml file, you'll have to write one... it's a big XML file that contains various "targets" that control whatever you want to do. It helps to see an example of the format ANT expects before trying to write this from scratch... have a look at the tutorial "
Hello World with ANT", or look up some open source projects that use ANT and see how they do things.
Alternatively, many IDEs have built-in ANT support, and will let you generate ANT scripts to build your project and run ANT targets in your build.xml through your
IDE. Of course, the exact way to do this depends on the IDE you're using...