Guide

What is machine learning?

Updated 28 July 2026 Part of Artificial Intelligence

Machine learning is a way for a computer system to improve at a task by learning patterns from data. Unlike traditional programming, where people write explicit rules for each situation, machine learning models are trained: they are shown examples, their mistakes are measured, and their internal settings are adjusted so they can make useful predictions or decisions on new cases. This is why the same broad idea can support spam filtering, speech recognition, product recommendations, fraud detection, and medical image review.

How machine learning works

A traditional program follows instructions written by a person. If the rule says to block an email containing a certain phrase, the program blocks it. That works when the rules are clear and stable.

Machine learning is useful when the rules are hard to write by hand. A spam filter, for example, cannot rely on a fixed list of phrases because unwanted messages change. Instead, a model can learn from examples of messages that were accepted or rejected. During training, it looks for signals in the data, tests its own output, and changes its settings to reduce mistakes.

After training, the model is used on data it has not seen before. The aim is not to memorise the training examples. The aim is to generalise, meaning it applies what it learned to new inputs that are similar in useful ways.

The quality of the training data matters. If the examples are incomplete, biased, unclear, or unlike the real cases the model will meet, the model can produce poor results even if the method is sound.

Core types of machine learning

Supervised learning uses examples that include the answer the model is meant to learn. An email might be labelled as spam or not spam. A photo might be labelled by what it contains. The model learns the relationship between the input and the known answer, then uses that pattern on new inputs.

Unsupervised learning uses data without supplied answers. The model looks for structure, such as groups of similar customers, unusual transactions, or related documents. This can help people discover patterns they did not define in advance.

Reinforcement learning trains a system through rewards and penalties. The model, often called an agent in this setting, tries actions in an environment and learns which choices lead to better outcomes. This approach appears in game-playing systems, robotics research, and control problems where feedback comes from action over time.

Where machine learning appears

Machine learning often works in the background of familiar tools. Search engines use models to rank results. Streaming services use them to suggest films, music, or shows. Banks use them to flag payment activity that looks unusual. Phones use them to recognise speech, faces, or handwriting. Translation tools use them to convert text from one language to another.

In healthcare, machine learning can help identify patterns in images or records, but it does not replace clinical judgement. In finance, it can support risk scoring or fraud detection, but personal financial decisions still need human responsibility and, where appropriate, professional advice.

What machine learning is not

Machine learning is not magic, and it is not the same as understanding in the human sense. A model finds statistical patterns and uses them to produce an output. It can be useful without being conscious, and it can be confident while still being wrong.

That makes machine learning powerful but limited. It works best when the task is clear, the data is relevant, and the output can be checked. Its value comes from turning past examples into better handling of new cases.