When you text on your phone, it suggests the next word above the keyboard. Type “See you” and it offers “tomorrow” or “soon”. Your phone learned that from the messages you and other people type.
ChatGPT works on the same idea, at a far bigger size. It's built on a large language model. A large language model is a computer program that read a huge amount of text and learned to predict the next word.
“Large” means two things. It read more text than a person could read in thousands of lifetimes: books, websites, articles and more. And it has billions of tiny internal settings that hold what it learned.
When you ask it a question, it writes the answer one word at a time. It picks a likely next word, then the next, then the next. It does this so well that the result reads like a person wrote it.
Training is how the program learned. Training means the program reads text, guesses the next word, checks the real word, and adjusts its settings a tiny bit. It repeats that billions of times. Later, people rated its answers, so it learned to act like a helpful assistant and not just finish sentences.
OpenAI, the company that makes ChatGPT, says the same thing in its own help pages. Its models learn patterns in text and predict the next likely word. It also says the models don't keep copies of the text they learned from.