Machine learning is the part of artificial intelligence that lets computers learn from examples rather than follow rules a programmer writes by hand. It sits underneath almost every AI product you use today, from spam filters and photo search to chatbots.
Key takeaways
- Machine learning lets computers learn from examples instead of following rules that a programmer writes by hand for every case.
- Models are tested on examples they did not see in training, because a model that only memorized its data would fail in the real world.
- The three main types are supervised, unsupervised and reinforcement learning, and large language models combine several of these ideas.
- When judging an AI product, ask what data it was trained on and how it was evaluated, since a model also learns the flaws in its data.
If you understand the basic idea, a lot of AI news becomes easier to follow, including why AI systems are impressive in some situations and unreliable in others.
Rules versus examples
Traditional software works by following explicit instructions. To flag spam, a programmer might write rules such as “if the subject line contains ‘you have won’, mark it as spam.” This works until spammers change their wording, and someone has to write a new rule.
Machine learning takes a different approach. Instead of writing the rules, you collect thousands of emails that people have already labeled as spam or not spam. A learning algorithm studies those examples and adjusts a mathematical model until it can tell the two apart. The result is a model that can classify emails it has never seen.
The computer scientist Arthur Samuel, who built a checkers program that improved by playing against itself, is often credited with popularizing the term in 1959. His description still holds up: giving computers the ability to learn without being explicitly programmed for each case.
How learning actually happens
Most machine learning follows the same loop. You start with data, meaning examples of the problem, such as house listings with their sale prices. You pick a model, which is a mathematical function with many adjustable settings called parameters. The model guesses the answer for each example, and you measure how far those guesses were from the real answers. Then an optimization method nudges the parameters to shrink the error, and the loop runs again, often millions of times.

When training is done, the model is tested on examples it did not see during training. This matters: a model that only memorized its training data would score perfectly there and fail in the real world. That failure is called overfitting, and avoiding it is one of the central problems in the field.
The three main types
Supervised learning
The model learns from labeled examples: emails marked spam or not, X-rays marked by doctors, photos tagged with their contents. Most practical business applications, such as fraud detection or demand forecasting, use supervised learning.
Unsupervised learning
The data has no labels, and the model looks for structure on its own, such as grouping customers with similar buying habits or spotting transactions that do not fit the usual pattern.
Reinforcement learning
The model learns by trial and error, receiving rewards or penalties for its actions. It is how systems learned to play Go and many video games at superhuman levels, and a version of it, learning from human feedback, is used to make chatbots more helpful.

Large language models combine several of these ideas. They are first trained on huge amounts of text to predict the next word, a form of self-supervised learning, and then refined with human feedback. Our explainer on large language models goes deeper.
Where you already meet machine learning

- Spam and fraud filters in your email and bank account
- Recommendations on streaming services and online shops
- Photo search that finds “dog” or “beach” in your camera roll
- Speech recognition in voice assistants and dictation
- Maps that predict traffic and arrival times
- Translation between languages
| Task | Type of learning | What the model learns from |
|---|---|---|
| Spam filtering | Supervised | Emails labeled spam or not spam |
| Customer grouping | Unsupervised | Purchase histories without labels |
| Game playing | Reinforcement | Wins and losses from many games |
| Chatbots | Self-supervised, then feedback | Large text collections, then human ratings |
What machine learning is not good at
Machine learning is powerful, but its limits follow directly from how it works. It learns whatever is in the data, flaws included, so if historical data reflects unfair decisions the model can reproduce them. We cover this in our article on bias in AI systems.
It also struggles outside its experience. A model trained on summer driving data may perform badly in snow, and changes in the world after training are a common source of failure. It finds correlations, not causes, so it may notice that two things happen together without any idea why. And complex models, especially deep neural networks, make decisions that are hard to trace step by step.
So a machine learning system is only as good as the examples it learned from and the situations it was tested in. When you’re judging an AI product, ask what data it was trained on and how it was evaluated.
Machine learning, deep learning and AI
These terms are often used interchangeably, but they nest inside each other. Artificial intelligence is the broad goal of making machines perform tasks that seem to require intelligence. Machine learning is the main method used to get there today. Deep learning is a type of machine learning that uses large neural networks with many layers, and it powers most recent breakthroughs in images, speech and language.
Frequently asked questions
What is machine learning in simple terms?
It is a way of making computers learn from examples instead of following rules a programmer writes by hand. The system adjusts a mathematical model until it makes accurate predictions on data it has not seen.
What is the difference between AI, machine learning and deep learning?
AI is the broad goal of making machines do tasks that seem to need intelligence, machine learning is the main method used to get there today, and deep learning is a type of machine learning that uses large neural networks with many layers.
What is overfitting?
Overfitting happens when a model memorizes its training data instead of learning general patterns, so it scores well on examples it has seen but fails on new ones. Testing on unseen data catches it.
Why does machine learning make mistakes?
It learns whatever is in its data, including flaws and bias, struggles with situations unlike its training examples, and finds correlations rather than causes.
Sources
- Machine learning, explained, MIT Sloan School of Management
- Machine Learning Crash Course, Google for Developers
- What is machine learning?, IBM
- Some Studies in Machine Learning Using the Game of Checkers, Arthur Samuel, IBM Journal of Research and Development, 1959



