Language models predict the next word in a sequence.
Training data teaches them which words usually appear together.
That's basically it in a nutshell.
Truth and accuracy? Those are just happy accidents when the patterns happen to be correct.