A file is a collection of data stored in a computer system. Types of files include text files, binary files, executable files, and multimedia files. Each type serves a different purpose and is used for various applications.