A document in MongoDB is a single record in the database that is made up of key-value pairs. It can be compared to a row in a relational database. Documents also can contain other documents, arrays, and arrays of documents.
A collection in MongoDB, on the other hand, is a group of MongoDB documents. It is equivalent to an RDBMS table. A collection exists within a single database. Collections do not enforce a schema, which means different documents within a collection can have different fields.