It learned by reading
Before you ever chat with it, an AI model is trained on a huge amount of text: books, websites, articles, and more. That’s where its general knowledge comes from.
Training happens before the model is released. After that, it doesn’t keep learning from the internet on its own.