A file is a container your computer uses to store one thing — a document, photo, video, program, or piece of data — in a way it can find, open, and use later.
When you save a document in Microsoft Word, take a photo on your phone, or read music, you are creating a file. The file holds the actual content — the words, the image data, the song — plus information about what kind of thing it is. Your computer uses that information to know which program should open it and how to display it.
Files are not floating around loose inside your computer. They live in folders (also called directories), which are containers that organize files the same way a filing cabinet organizes papers. Folders can hold other folders inside them, creating a structure that lets you find things. When you look at your Desktop or open File Explorer on Windows or Finder on Mac, you are looking at folders and the files inside them.
Key Takeaways
- A file is a single item — a document, image, video, or program — stored on your computer with a name and a file type that tells your computer what it is.
- The file extension (the letters after the dot in the filename) shows what kind of file it is: .docx for Word documents, .jpg for photos, .mp4 for videos, .exe for programs.
- Files live in folders, which organize them the way a filing cabinet organizes papers, and folders can contain other folders.
- Your computer stores files on a hard drive or solid-state drive, which is permanent storage that keeps the file even after you turn off the computer.
How file names and extensions work
Every file has a name you give it, followed by a dot and a short code called the file extension. The extension tells your computer what kind of file it is. When you see "Resume.docx", the .docx part means it is a Word document. When you see "Vacation.jpg", the .jpg part means it is a photograph. When you see "Setup.exe", the .exe part means it is a program you can run.
The extension matters because your computer uses it to decide which program should open the file. If you double-click Resume.docx, your computer looks at the .docx extension, sees that it belongs to Microsoft Word, and opens Word to display the document. If you double-click Vacation.jpg, your computer opens it in your photo viewer instead. Without the extension, your computer would not know what to do.
You can change a filename whenever you want — right-click the file, choose Rename, and type a new name. But you should not change the extension unless you know what you are doing, because changing .docx to .txt will confuse your computer about what program should open it.
Common file types and what they are used for
Different kinds of files have different extensions because they store information in different ways. Documents use .docx (Word), .pdf (portable document), or .txt (plain text). Photos use .jpg, .png, or .gif. Videos use .mp4, .mov, or .avi. Programs use .exe on Windows or .app on Mac. Spreadsheets use .xlsx (Excel). Each extension is a signal about what the file contains and how to work with it.
You do not need to memorize all of them. The important thing to know is that if you read a file and your computer does not know what program opens it, the extension will tell you. You can search online for ".mp4 file" or ".zip file" and learn what it is and which program you need. Many files you encounter will be ones you already know — documents you created, photos you took, or programs you installed.
Where files are stored on your computer
Files live on your computer's hard drive or solid-state drive — the permanent storage inside your machine. This is different from RAM (memory), which your computer uses temporarily while programs are running and then clears when you shut down. Files on your hard drive stay there even after you turn off the computer. When you turn it back on, the files are still there, waiting for you to open them.
On Windows, files are usually organized in folders like Documents, Downloads, Pictures, and Desktop. On Mac, the structure is similar: Documents, Downloads, Pictures. You can create your own folders anywhere to organize files the way you want. A folder can hold hundreds of files, and folders can contain other folders, creating a tree structure that keeps everything organized.
The difference between saving and opening a file
When you open a file, your computer reads it from the hard drive and loads it into the program that can display it. If you open a Word document, Word reads the file and shows you the text on your screen. The original file stays on the hard drive unchanged.
When you save a file, you are telling your computer to write what you have created or changed onto the hard drive so it becomes permanent. If you write a letter in Word and then close the program without saving, the letter disappears — it was only in RAM, not on the hard drive. If you save it first, the file is written to your hard drive and will still be there the next time you turn on your computer.
This is why the Save button matters. Every time you make changes to a document and want to keep them, you save. Most programs let you press Ctrl+S (Windows) or Command+S (Mac) to save quickly. Some programs auto-save, meaning they save your work automatically every few minutes so you do not lose it if the power goes out.
How to find and organize your files
On Windows, open File Explorer (the folder icon on your taskbar). On Mac, open Finder (the face icon in the dock). Both show you the folders on your computer and the files inside them. You can navigate through folders by double-clicking them, and you can see the path at the top showing where you are — something like "Documents > Work > 2024 Projects".
To find a file you cannot locate, use the search box. On Windows, press Ctrl+F in File Explorer and type the filename or part of it. On Mac, press Command+Space to open Spotlight and type the filename. Your computer will search through all your files and show you matches. This is faster than clicking through folders when you have hundreds of files.
To stay organized, create folders for different areas of your life — Work, Personal, Photos, Finance. Inside those, create subfolders for specific projects or years. When you save a new file, save it into the right folder instead of leaving everything on your Desktop. This takes a few seconds but saves you hours of searching later.
What happens when you delete a file
When you delete a file, your computer does not when ready erase it from the hard drive. Instead, it moves the file to the Recycle Bin (Windows) or Trash (Mac). The file is hidden from your normal view, but the data is still there. If you realize you deleted something by mistake, you can open the Recycle Bin or Trash, find the file, and restore it.
The Recycle Bin and Trash fill up over time. When they get full, your computer starts permanently erasing old deleted files to make room. You can also empty the Recycle Bin or Trash manually by right-clicking it and choosing Empty. Once you do that, the file is gone for good — you cannot get it back through normal means.
This is why it is a good idea to be careful when deleting files, especially important ones. If you are not sure whether you need something, move it to a folder called "Old" or "Archive" instead of deleting it. That way, if you need it later, you know where to find it.
Frequently Asked Questions
What is the difference between a file and a folder?
A file is a single item that holds content — a document, photo, or program. A folder is a container that holds files and other folders. Think of a file as a piece of paper and a folder as a drawer that holds papers.
Can I change a file's extension to convert it to a different format?
Changing the extension alone does not convert the file. A .jpg photo will not become a .png just because you rename it — the image data inside is still in the old format. To truly convert a file, you need a program designed to do that conversion, like an image editor or a file converter.
Why does my computer say a file is corrupted?
A corrupted file is one where the data inside got damaged, usually from an incomplete read, a hard drive error, or a program crash while saving. Your computer cannot read it properly. You may be able to recover it from a backup, or you may need to read or recreate it.
What is a shortcut or alias?
A shortcut (Windows) or alias (Mac) is a small file that points to another file without duplicating it. If you create a shortcut to a document on your Desktop, clicking the shortcut opens the original document wherever it actually lives. This lets you access files from multiple locations without storing them twice.
How much space do files take up on my hard drive?
Different files take different amounts of space. A text document might be 50 kilobytes. A photo might be 3 megabytes. A video might be 500 megabytes or more. You can right-click a file and check its properties to see its size. If your hard drive is getting full, deleting large video or photo files frees up the most space.