Traditional software runs on rules a programmer wrote: "if X happens, do Y." Machine learning flips that. Instead of writing the rule, you show the system many examples and it works out the pattern itself.
Example: to build a spam filter the old way, you would try to list every suspicious phrase. With machine learning, you feed it thousands of emails already marked "spam" or "not spam", and it finds the patterns that separate them, including ones you would never have thought to write down.
The learning loop in three steps
Guess. The model makes a prediction. At the very start it is close to random.
Measure the error. Compare the guess with the correct answer and work out how wrong it was.
Adjust. Nudge the model's internal numbers slightly so the same mistake is a little less likely next time.
Repeat that millions of times and the guesses get steadily better. That repeated loop is what "training" means. The numbers being nudged are the model's parameters (see What "Parameters" Actually Means).
The learning loop behind most machine learning.
The main ways a system learns
Supervised learning uses labelled examples ("this is a cat", "this is not a cat"). Much practical AI starts here.
Unsupervised learning finds structure in data with no labels, such as grouping customers by similar behaviour.
Reinforcement learning learns by trial and error from a reward signal, like a game-playing system improving by playing against itself.
Self-supervised learning is how language models are mainly trained. The text itself provides the answer: hide the next word, ask the model to predict it, and check. No human has to label billions of sentences, which is what makes training on so much text possible.
How we know a model has really learned
Builders keep part of the data aside and never show it to the model during training. After training, they test on that held-back data. If the model scores well on what it practised but badly on what it has never seen, it has memorised instead of learned. This is called overfitting, and it is why test results on unseen data matter more than training results.
Does more data always mean a better model?
Often, but not automatically. A model trained on 500 examples can latch onto coincidences, and one trained on millions has less room to be fooled by noise. But quality counts as much as quantity. A huge pile of duplicated, biased or low-quality data can produce a worse model than a smaller, carefully chosen set.
Where it can go wrong
Bias in, bias out. If the training data gives a skewed or incomplete picture of the world, the model's outputs will too.
Overfitting, as described above.
Confident wrongness. A model has no built-in sense of "I'm not sure". It can state a wrong answer as smoothly as a right one, which is why checking facts matters.
Not in the way a person does. It's identifying statistical patterns in language and generating text consistent with those patterns — it doesn't hold beliefs or intentions.
How long does training actually take?
It varies hugely — a small model might train in hours on a laptop; a large language model can take weeks on thousands of specialised chips.