How is an LLM trained to "learn language"?
By predicting the next token. The prediction is compared with the real text, and each error adjusts the parameters a little, over and over.
Given "Die Musikerin spielt ein …" ("The musician plays a …"), the model outputs a probability for each candidate: Konzert (concert) 72 %, Instrument 10 %, Stück (piece) 4 %, and so on. The actual next word in the training text is compared with that distribution. The error nudges the parameters so that the right continuation becomes a little more likely next time. Repeat this billions of times.
What the model learns is therefore which continuations are probable in which context, not what is true. That is why fluent text and correct text are not the same thing (see the limits card).
Go deeper:
3Blue1Brown: Transformers, the tech behind LLMs — shows the probability distribution over the next token and how text is generated from it.
Wikipedia: Language model — the probabilistic model of word sequences that LLMs scale up.