Perhaps 25% of the cases I handle involve the authorship of anonymous, disputed, or forged documents. The client wants to know who's writing those nasty, threatening emails or letters. I typically ask the client for writing samples from the suspected author. Sometimes there's more than one suspect, and I have to decide which of them may be the author of the anonymous document(s).
There are many different kinds, dozens of areas of emphasis. Ultimately one becomes one's own kind of linguist, depending on where one's interest and preferences lead.
A forensic linguist must be exquisitely sensitive to nuances of text. Where a synonym exists, the very choice of each word represents a decision on the part of the author. Superimposed upon that is the way the word is spelled, abbreviated or capitalized. Truly, a text is a tangle of choices.
All of a sudden, it seems, the search term Plagiarism Rand Paul gets over 40 MILLION Google hits. But the charge is somewhat bogus.
I advertise myself (accurately) as a "linguistics expert" so I sometimes get questions about language usage.