Maven is a build system. Its primary purpose is to create modules (or "artefacts") such as Web applications, Library JARs, stand-alone executable JARs and the like using a well-defined project directory structure, implied built rules and a request to build one or more
goals.
Unlike Ant, which requires you to write your own build rules and define your own directory structure, Maven takes advantage of the "If you've seen one
Java project, you've seen them all" approach. Which isn't strictly true, but for the most common types of artefact, it's close enough.
Thus, all files constructed by Maven are placed under a master output directory named
/target. Mainline Java source code is under
/src/main/java.
Unit tests sources are kept separately under
/src/test/java so that test files don't get built into production code. Property files and other data files go under
/src/main/resources. And so forth.
There is also a master project definition file called the POM (pom.xml) that indicates fine details about the project such as its formal name and version and any dependencies that Maven may need to pull in to do its work.
You can then run goals against the project. For example, "mvn clean" runs the "clean" goal, which simply deletes the /target directory and everything under it. Thanks to the way Maven is organized, I can take a Maven project, run the "clean" goal, ZIP it up and ship it to some faraway land. The recipient can then exactly rebuild everything by unzipping the project and running Maven. The only two things that the recipient needs are compatible versions of Maven (which you can download from
https://maven.apache.org and install by unzipping maven and setting the MVN_HOME environment variable (for convenience, add MVN_HOME/bin to your command PATH). And, of course, a compatible version of Java to do the actual compiling and related work. That's all. Just those 2 applications plus your project!
In its basic form, Maven simply takes source and builds an artefact. However, Maven can be extended and goals can be added that will, for example, launch the artefact into a
Tomcat webapp server. That's something a lot of people like to do, but it's not actually essential and I prefer not to, myself.
Maven pairs well with IDEs. Generally an IDE will either have a Maven plugin pre-installed as part of the IDE or one can be downloaded and plugged into the IDE. The advantage here is that it makes certain popular Maven functions available from the IDE's menus and toolbars, plus often makes the maven aspects of the project easier to visualize (for example, you can get a dependency graph in an IDE window).