What is considered as a document in mongoDB?
In the context of MongoDB, a document means any piece of valid BSON* (binary JSON). The word does not have the everyday meaning of, say, an MS Word file or PDF.

A collection is a container for zero or more documents. There is no requirement for all documents in a collection to have the same structure. Indeed, that is one of the drivers behind the NoSQL movement. So it would be possible to store a shopping cart, a birth certificate and a recipie for chocolate cake in the same collection. (Though possible it would be an exceedingly poor design.) A collection is also the boundary for some management tasks, like copying, and authorisation.



* BSON is actually an important distinction as there are more data types than JSON. For example, the default primary key (_id field) is an ObjectId, which doesn't exist as a standard JSON type.

For more context see:


Documents; and 
MongoDB Extended JSON.


BSON and MongoDB Extended JSON are JSON-like in terms of document structure, but definitely not interchangeable.