In computing, a file is a self-contained piece of information available to the operating system and any number of individual programs.
Computer Skills Course: File Management, Part 1
A computer file can be thought of as a traditional file that you would find in an office filing cabinet. Just like an office file, the information in a computer file can be anything.
Whatever program uses an individual file, it is responsible for understanding its contents. Similar types of files are said to have a common "format." In most cases, the easiest way to determine the format of a file is to look at the file extension.
Every single file in Windows (and most other operating systems) has a file attribute that imposes a condition on the file. For example, you cannot write new information to a file that has the read-only attribute turned on.