A file system is a method of organizing files on a computer's storage volume. File systems keep track of every file on a volume, recording its name, file type, and location so that a computer's operating system can find it later. A volume needs a file system created on it by a computer's operating system before it can store any data, whether it is on a hard disk drive, solid-state drive, or external flash drive.
A computer's operating system creates a file system when it initializes or formats a volume. A file system includes a database-like index to manage a folder hierarchy, beginning with a root directory and allowing you to create folders and subfolders. File systems uniquely identify files on a volume using a combination of file name and location, so two files with identical names can exist on the same volume as long as they are in different folders.
File systems also save metadata about files and folders. Most file systems record when a file was created and edited using timestamps. File systems on multi-user operating systems also keep track of which user has ownership of files or folders, as well as any other users that have permission to view and edit them. Some file systems can encrypt files, folders, or entire volumes to keep them secure.
Different operating systems each use their own default file system. Windows uses NTFS, macOS uses APFS, and most Unix-like operating systems use the ext4 file system. Other file systems with cross-platform support, like exFAT and FAT32, are often used on storage devices that transfer files between computers.