The short answer is that Forensic Document Examination, aka questioned document examination (or FDE/QDE), is the forensic science that deals with documents in dispute or in question.  There are, of course, many different types of documents and many different aspects of a document that might be in question.
As the AAFS website describes it,
Questioned document examination, also referred to as forensic document examination, is the branch of forensic science best known for the determination of authorship of signatures and handwriting but, in fact, involves much more comprehensive analyses of writing instruments, writing mediums, and office machine products.
Most of the time questioned documents are relevant to some dispute between parties, and very often that dispute will be legal in nature.
At other times, sometimes a particular aspect of a document is 'in question'. For example, in genealogical research or when dealing with other ‘historical’ documents, the issue is whether markings can be made more visible, or determining how a document was constructed or changed.   You can learn more about this on my About FDE page.