In a real office with paper:
A document is made of printed papers on a single subject or purpose. For example, a letter, an order, a policy statement are documents.
A file is a collection of documents, usually with a single purpose, such as all documents on project X.
Computers, IT:
A file is a logical entity stored by the computer. It is treated as a unit. It can be deleted as a single thing. It could contain an image, writing, + images, or many other things. Computer programmes & apps also are files. Some files hold information for the computer & are never meant to be read or changed by humans directly. The file can be on disk, or flash drive, or any other media. DVDs you watch are a collection of files arranged in places & ways the player knows where to find them.
A document is the same as before, but stored as file, or sometimes as multiple files.