A common use of a pre-trained LM -typically trained on an extremely large corpus -is to predict the likelihood of an 'unseen' sample of text: The higher the score (or the lower the perplexity) a text is assigned, the more probable it is, given the model.
a fluent, wellformed text is likely to be scored higher by an LM than a text containing linguistic anomalies.