A file is a container your computer uses to store information in one place
A file is a collection of data — text, images, video, code, or anything else — saved under a single name on your computer's storage. When you write a document in Word, take a photo on your phone, or read music, you are creating or moving a file. Your computer treats that file as a unit: you can move it, copy it, delete it, or open it with a program that knows how to read that type of data.
Files have two parts that matter to you: a name and a file type. The name is what you choose — "Budget 2024" or "Vacation Photos". The file type is marked by the extension, the letters after the period at the end. A file called "letter.docx" is a Word document. "photo.jpg" is an image. "song.mp3" is audio. The extension tells your computer which program should open it.
Without files, your computer would have no way to organize or save anything. Every program you use — your email, your browser, your photos app — works by creating, reading, and storing files.
Key Takeaways
- A file is a single container of data with a name and a file type extension that tells your computer what kind of information it holds.
- The file extension — the letters after the period — determines which program can open and read the file.
- Files live in folders, which organize them the same way drawers organize papers in a filing cabinet.
- You can move, copy, delete, or rename files, and your computer tracks where each one is stored.
File types and what the extensions mean
The extension at the end of a filename is a code that tells your computer what the file contains and which program should open it. Common extensions include .docx (Word document), .xlsx (Excel spreadsheet), .pdf (portable document), .jpg or .png (image), .mp4 (video), and .txt (plain text). When you double-click a file, your computer looks at the extension and opens the program it knows handles that type.
Some extensions are associated with multiple programs. A .txt file can open in Notepad, Word, or dozens of other text editors. A .jpg image can open in your photo viewer, Photoshop, or a web browser. Your computer has a default program for each extension — usually the one you use most often — but you can change which program opens a file by right-clicking it and selecting "Open with".
If you rename a file and change the extension by mistake, the file itself does not change, but your computer may no longer know how to open it. Changing "photo.jpg" to "photo.txt" does not turn the image into text — it just hides the image from your photo app.
Where files live: folders and storage
Files live inside folders, which are containers that organize files the way drawers organize papers. A folder can hold files or other folders. Your computer's main storage area is called the hard drive or solid-state drive (SSD), and it is divided into folders to keep things organized. On Windows, you have a Documents folder, Downloads folder, Desktop, and others. On Mac, the structure is similar.
When you save a file, you choose which folder it goes into. If you save a document to your Desktop, it appears as an icon on your desktop. If you save it to Documents, you have to open the Documents folder to find it. The path to a file — the list of folders you have to open to reach it — might look like "Documents > 2024 > Taxes > Return.pdf".
Your computer keeps track of every file's location. When you search for a file by name, your computer searches through all the folders and returns the path where it found it. If you move a file from one folder to another, your computer updates its location automatically.
File size and what it tells you
Every file takes up space on your storage, measured in bytes. A straightforward text document might be 50 kilobytes (KB). A high-resolution photo might be 5 megabytes (MB). A video file can be several gigabytes (GB). The larger the file, the more storage space it uses and the longer it takes to read, email, or move to another device.
You can check a file's size by right-clicking it and selecting "Properties" on Windows or "Get Info" on Mac. If your storage is running low, looking at file sizes helps you decide what to delete. Video and photo files are usually the largest; text documents are usually the smallest.
File size also matters when you are uploading or emailing. Many email services limit attachments to 25 MB or less. Cloud storage services like Google Drive or OneDrive have storage limits — you might have 5 GB free, which could hold hundreds of documents but only a few high-quality videos.
How to manage files: moving, copying, and deleting
You can move a file from one folder to another by dragging it, cutting and pasting it, or using your file manager. Moving a file removes it from its original location and puts it in the new one. Copying a file creates a duplicate — the original stays where it was, and you now have two identical files in different places.
Deleting a file removes it from your storage. On most computers, deleted files go to a Trash or Recycle Bin folder first, where they stay until you empty the trash. Until you empty it, you can recover a deleted file by opening the trash and moving it back. Once you empty the trash, the file is gone from your computer (though data recovery services can sometimes retrieve it).
Renaming a file is straightforward: right-click it and select "Rename", then type a new name. You can change the name but keep the same extension, or you can change both — though changing the extension can make the file unreadable by the program that normally opens it.
Files versus programs: what is the difference
A program (or process) is software that does something — Word processes documents, Photoshop edits images, Chrome browses the web. A file is the data you create or work with inside that program. When you open Word and write a letter, the letter is a file. Word itself is a program. You can have one copy of Word installed on your computer, but you can create hundreds of letter files.
Programs are usually stored in a special folder on your computer (Program Files on Windows, Applications on Mac). When you install a program, you are copying its files to your computer. When you uninstall it, you are deleting those files. Files you create — documents, photos, videos — are usually stored in your Documents, Pictures, or Downloads folders, separate from the programs themselves.
Cloud storage and files
You can store files on your computer's hard drive, or you can store them in the cloud — on servers owned by companies like Google, Microsoft, or Apple. Cloud storage services like Google Drive, OneDrive, and iCloud let you save files online so you can access them from any device with an internet connection.
When you save a file to cloud storage, a copy lives on your computer and a copy lives on the company's servers. If your computer crashes, your file is still safe in the cloud. If you delete the file from your computer, you can still access it from another device. Most cloud services give you a limited amount of free storage — usually 5 to 15 GB — and charge for more.
Cloud files work the same way as local files: they have names, extensions, and file types. You can organize them into folders, move them, copy them, and delete them. The main difference is that you access them through a web browser or an app instead of opening a folder on your desktop.
Frequently Asked Questions
What happens if I delete a file by accident?
The file goes to your Trash or Recycle Bin, where it stays until you empty the trash. You can recover it by opening the trash folder and moving it back to its original location. Once you empty the trash, recovery is much harder, though data recovery services can sometimes retrieve deleted files.
Can I change a file's extension to convert it to a different format?
Changing the extension does not convert the file — it just tells your computer to try opening it with a different program, which usually fails. To truly convert a file (like turning a .jpg image into a .png), you need a program designed for that conversion, like an image editor or an online converter.
Why do some files have two periods and two extensions?
Some files have names like "document.backup.zip" or "archive.tar.gz". The last extension tells your computer what the file is (.zip or .gz means it is compressed). The second-to-last extension tells you what was compressed (.backup or .tar). Your computer only looks at the final extension to decide which program opens it.
What is the difference between saving and downloading a file?
Saving means you created or edited a file and told your computer to store it. Downloading means you copied a file from the internet to your computer. Both result in a file on your storage, but downloading usually puts the file in your Downloads folder by default.
How much storage do I actually need?
It depends on what you store. If you mostly use email and documents, 256 GB is plenty. If you store videos, photos, or large design files, you may need 512 GB or more. Cloud storage can extend your space, but uploading and downloading large files takes time.