Java was designed to be modular and for that it needs some way to load your code easily. The answer to this was the classloader, the classloader allows you to read resources from every entry of the classpath; you can look at resources in the classpath as a hierarchical structure similar to the file system.
The classloader is just a list of entries; each entry can be a directory in the filesystem or a JAR file. At this point, you should also know that JAR files are just zip files.
The classloader will treat each entry as a directory (JAR files are just zipped directories) and it will look for files in each directory.
There are a lot of concepts here to remember, let's try to summarize them: