Like…Sophisticated autocomplete — the same idea as your phone guessing the next word, trained on far more text and far better at it.
What it isA "large language model": software that predicts the most likely next chunk of text from patterns it learned in training. It generates language; it does not look things up.
For exampleAsk it for a quote and it produces something that sounds right — because it is predicting plausible text, not retrieving a stored record.