When I create my Java projects I use Netbeans or IntelliJ to create a empty Java project and just run the code using the IDE. I noticed there are private server projects that are written in Java but have to be opened as a Maven or Gradle project. From what I gathered so far from looking at them, Maven and Gradle are used when you have a lot of libraries that are used in your project and need to be imported. Is Maven and Gradle used solely for being able to create projects that can move from system to system and have all the libraries be auto-fetched??? I looked up both Maven and Gradle on the wikipedia and it didn't really help my understanding of what they are. Is there a difference between Maven and Gradle? What is Maven and Gradle?? (In the simplest of terms so I can understand.)

Sorry if it's a dumb question but I am trying to further my understanding of the software development world and I know you guys will do a good job of explaining it to me.