Rather than coding every rule, you give a machine learning algorithm many examples and it adjusts a model until its outputs match the data well. Most modern AI, from recommendation feeds to chatbots, is built this way.

How it works

Machine learning starts with data, a model and a goal. The model is a mathematical function with adjustable parameters. A loss function measures how wrong its predictions are, and an optimisation method, most often gradient descent, nudges the parameters to reduce that error, repeating over many passes through the data. There are three main styles. In supervised learning the data is labelled, for example emails marked spam or not spam, and the model learns to predict the label. In unsupervised learning there are no labels and the model finds structure on its own, such as grouping customers with similar behaviour. In reinforcement learning an agent learns by trial and error, earning rewards for good actions. To check real performance, data is split into training and test sets, because a model that only memorises its training examples, called overfitting, fails on new data. Methods range from simple linear regression and decision trees to deep neural networks. The term was popularised by Arthur Samuel in 1959 while working on a self-improving draughts program.

Why it matters

Machine learning sits behind much of the technology creators and businesses rely on: platform recommendation algorithms, ad targeting, spam filters, fraud checks, transcription and generative AI. Understanding its basics helps you see why algorithms reward certain behaviour, why data quality matters, and why predictions can be confidently wrong. It also helps you judge vendor claims and spot when a simple rule would work better than a model.

Where you will see it

  • Recommending videos based on what similar viewers watched and finished.
  • Flagging suspicious card payments for a fraud team to review.
  • Forecasting stock levels from past sales and seasonal patterns.
  • Filtering spam and phishing emails before they reach your inbox.

Limits and common misconceptions

  • A model is only as good as its data; biased, outdated or messy data produces biased, outdated or wrong predictions.
  • Many models find correlations, not causes, so their predictions can break when conditions change.
  • Complex models can be hard to explain, which matters for decisions about loans, hiring or health.

How it differs from related terms

Frequently asked questions

What is machine learning in simple words?

It is teaching computers by example. Instead of writing exact instructions, you show a program lots of data, and it works out the patterns itself. It can then apply those patterns to new data, for example recognising a cat in a photo it has never seen.

What is the difference between AI and machine learning?

Artificial intelligence is the broad field of making machines perform tasks that normally need human intelligence. Machine learning is one approach within AI, where systems learn from data. Older AI used hand-written rules; today almost all practical AI uses machine learning, so the terms are often blurred.

What are the main types of machine learning?

The three main types are supervised learning, which learns from labelled examples; unsupervised learning, which finds patterns in unlabelled data; and reinforcement learning, which learns from rewards and penalties. Self-supervised learning, where data supplies its own labels, is how large language models are pre-trained.

Related terms

All AI terms