In NLP tasks, we may want to understand what a sentence means, or if a paragraph is written in which kind of (happy, sad, etc.) mood. These tasks are called Natural Language Understanding, and, Sentiment Analysis.
The text we are processing in such tasks, is called a document, in NLP terminology. So, a document is a single piece of text that we want to process.
We might formulate our problem (our task) such that, our documents are individual sentences, or maybe paragraphs. There are also cases where we might want our documents to be the whole text, such as articles, or books.
So if we would like to do sentiment analysis on tweets, each tweet would be one document. We would want to represent this tweet numerically, to feed it to our model. Then, our model can predict if the tweet is “happy”, or “sad”.