Modules have at least one content root folder, also referred to as a content root for short. All the files that make up your module must be within its content root (i.e., inside the content root folder).
A module can have more than one content root, however, in most of the cases one content root will suffice.
Folders within content roots may be assigned to the following categories:
Source roots (or source folders).
By assigning a folder to this category, you tell IntelliJ IDEA that this folder and its subfolders
contain source code that should be compiled as part of the build process.
For Java, the top of this folder is considered the root of a package hierarchy; .java files in it are considered part of the default package, whereas subfolders designate a standard Java package structure.
A source root folder can contain the files that are not source code files (.xml, image files, etc.). When building a module, such files, generally, are copied to the output folder as is.
Source folders in IntelliJ IDEA are shown blue .
Test source roots (or test source folders) are similar to source roots
but are intended for code used for testing (e.g., for unit tests).
Test source folders let you keep code related to testing separate from the production code.
Test source folders in IntelliJ IDEA are shown green .
Compilation results for sources and test sources, normally, are placed into different folders.
Excluded folders are ones that IntelliJ IDEA doesn't "see" and, thus, totally ignores.
Typical candidates for exclusion are temporary build folders, generated output, logs,
and other project output.
Excluded folders, when appropriate, are shown pink .