Is the language model based on character or word?

I wonder whether the language is trained based on character or word?

A LM is a file containing probabilities about words order in sentences…