One piece at a time
When a chatbot writes back to you, it doesn't produce the whole reply at once. It builds the answer one small piece at a time. At each step, it looks at everything written so far, including your message, and predicts what piece is likely to come next. Then it adds that piece and does it again, hundreds of times, until the reply is done. These pieces are often a word or part of a word. The next lesson covers them.
You have seen a tiny version of this on your phone. When you type "Happy birth", your keyboard suggests "day". A language model does the same kind of thing. But it is far bigger and learned from far more text, so its guesses take much more into account.
Why the result sounds so fluent
To predict well, the model had to pick up a lot about how language works. It learned grammar and common phrases. It learned how a recipe is laid out, how a polite complaint sounds, and how an explanation tends to move from simple to harder ideas. None of this was taught as a rule. It came from seeing patterns in a vast amount of writing.
So when you ask for a cover letter, the model keeps predicting the kind of words that show up in cover letters, in an order that fits your request. The result reads smoothly because smooth, typical writing is exactly what it learned to make.
Keep one thing in mind. The model is predicting what sounds likely, not checking what is true. Most of the time those line up. Sometimes they don't, and a later lesson looks at what happens then.
Why the same question gets different answers
At each step, the model doesn't have just one guess. It has a whole list of possible next pieces, each with a likelihood. For "The weather today is", it might rate "sunny" as very likely, "cold" as fairly likely, and "purple" as very unlikely.
Most chatbots don't always pick the top choice. They pick with a bit of chance, favoring likely options but sometimes taking a less likely one. This is called sampling. It's a little like rolling dice that are weighted toward the best guesses.
Because of sampling, the same question asked twice can get two different answers. One small difference early on changes what comes after, so the replies drift apart. This is useful. It keeps writing from sounding stiff and repetitive, and it means you can ask for another try when you don't like the first one.
Try it
Ask a chatbot the same question in two fresh chats, such as "Suggest a name for a small bakery." Compare the answers. Then try a question with one clear answer, like "What is the capital of France?" Notice which kind of question changes more between tries.