a directory and a path
Think of a library. A book has a name, but to find it you also need its location: which floor, which shelf, which slot. The filesystem is the same. A filename is just the book's name. A directory is a shelf that holds names. And a path is the full set of directions - floor by floor, shelf by shelf - that pins down exactly one file.
Concretely, a directory (often called a folder) is itself a special kind of file whose contents are a list of names paired with inode numbers - it maps each name to the file's real record (see the inode). A filename is one entry in some directory; the same file can even appear under several names in different directories. A path is a string that names a file by walking the directory tree, with components separated by slashes, like docs/reports/q3.txt. An absolute path starts from the root directory with a leading slash, like /home/ana/notes.txt, and means the same thing no matter where you run from. A relative path has no leading slash, like ../shared/data.csv, and is interpreted starting from your current working directory; the special names . (this directory) and .. (the parent directory) let you move around within a relative path.
Why it matters: nearly every file operation takes a path, and the absolute-versus-relative distinction is a constant source of 'file not found' bugs - a relative path that worked in one directory breaks when the program is launched from another. Knowing that a directory is just a name-to-inode map also explains why renaming or moving a file can be instant (you change a directory entry, not the file's data) and why a single file can have several names.
/home/ana/notes.txt <- absolute: same file from anywhere notes.txt <- relative: notes.txt in the current directory ../shared/data.csv <- relative: up one level, then into shared/
A leading slash means absolute (from the root); no slash means relative (from where you are).
A directory is a file that lists names; the name is NOT stored in the file's inode. So the same file can have many names (hard links), and a program's relative paths depend on its current working directory, which it can change with chdir() - launch location matters.