Directories allow you to create a structure and store your files in a way that is easy for you to organize and search for them. In reality, directories are entries on a filesystem that contain lists of other files and directories. This happens with the help of inodes, which are data structures that hold information about files and directories.
As you can see in the following figure, directories are implemented as lists of names assigned to inodes. As a result, a directory contains an entry for itself, its parent directory, and each of its children, which among other things can be regular files or other directories:
What you should remember is that an inode holds metadata about a file, not the actual data of a file.
A graphical representation of inodes