Files are containers used for storing data in computer storage devices. They allow data to be preserved even after a program terminates, and make it easy to enter large amounts of data and transfer data between computers. There are two main types of files: text files which contain plain text and have a .txt extension, and binary files which store data in 0s and 1s and have other extensions like .bin. Common file operations include creating, opening, closing, and reading from or writing to files using functions like fopen(), fclose(), fprint(), and fscanf() in C.