A language model learns statistical relationships among tokens from text or other language data. Given a sequence, it estimates likely continuations or produces representations that can support generation, classification, retrieval and other language tasks.
Building a model from scratch can teach core concepts, but practical products often use an existing trained model because training requires substantial data, compute and engineering. Developers can then focus on evaluation, tools, interfaces and the workflow where the model creates value.

