Explainer

How AI actually works

A plain-language, high-level tour of what artificial intelligence really is — from hand-written rules to neural networks, training, and the large language models behind today’s AI assistants.

How AI works: Artificial intelligence is an umbrella term for computer systems that perform tasks associated with human intelligence. It contains a subset called machine learning, in which systems learn patterns from data instead of following hand-written rules, and within that, deep learning, which uses multi-layered neural networks. A neural network is made of simple units ("neurons") joined by adjustable numbers called weights, arranged in layers; training adjusts those weights using data, and inference is using the finished model to produce outputs. Learning is commonly supervised (labeled data), unsupervised (finding structure in unlabeled data), or reinforcement (learning from reward). A large language model is a deep network, usually a transformer, trained on vast text to predict the next token — a chunk of text — one at a time; its learned weights are called parameters and number in the billions or trillions. Scaling data, compute, and parameters improved capability dramatically. Known limitations include hallucination, weak grounding, and sensitivity to how prompts are phrased.

This is a high-level view of artificial intelligence: what it is, how it learns, and what actually happens when you type a question into an assistant and it answers. It skips the mathematics and keeps the concepts, since the concepts are what most explanations get wrong or leave out. The idea is not new — the field has a history stretching back to the 1950s — but the systems that made AI a daily tool are recent.

The short version: modern AI does not follow instructions a person wrote out step by step. It learns patterns from very large amounts of data, stores what it learned as billions of adjustable numbers, and uses those numbers to make predictions. Everything below unpacks that sentence.

Three terms, nested inside each other

“Artificial intelligence,” “machine learning,” and “deep learning” are often used interchangeably. They are not the same thing: they are three circles, each sitting inside the last.

Artificial intelligence (AI)The broad field of building computer systems that perform tasks associated with human intelligence — reasoning, perception, language, decision-making. The widest of the three terms.
Machine learning (ML)A subset of AI in which systems learn patterns from examples rather than following hand-written rules. Most AI that works well in 2026 is machine learning.
Deep learningA subset of machine learning that uses neural networks with many layers. It powers modern image recognition, speech, and the large language models behind AI assistants.

All deep learning is machine learning, and all machine learning is AI — but not the reverse. A pocket calculator and a 1980s chess program are both AI in the broad sense, yet neither learns anything. When people in 2026 say “AI,” they almost always mean the innermost circle: deep-learning systems, and especially the generative ones that produce text and images.

A note on the word “AI.” The term is an umbrella, not a specific technology. It has been applied to expert systems, spam filters, recommendation engines, self-driving perception, and chatbots alike. Because the label keeps migrating to whatever is newest, it is often clearer to name the actual method — machine learning, a neural network, a language model — than to say “AI.”

Two ways to make a machine behave intelligently

There are broadly two strategies, and the history of the field is largely the story of the second overtaking the first.

Write the rules yourself (symbolic AI). The older approach, dominant from the 1950s into the 1980s, has experts encode knowledge as explicit rules: if this symptom and that test result, then suggest this diagnosis. These “expert systems” work well in narrow, tidy domains where the rules can be written down, and struggle everywhere else, because most real-world skills — recognizing a face, understanding a sentence — resist being spelled out. Nobody can list every rule that separates a cat from a dog in a photo.

Let the machine learn the rules (machine learning). The modern approach flips this around. Instead of writing the rules, you show the system many examples and let it infer the pattern. Show it enough labeled photos and it learns, statistically, what “cat” looks like — without anyone ever defining a cat. The rules still exist, but they are discovered by the machine and stored as numbers, not written by a person in advance.

What a neural network actually is

Most modern AI is built on the neural network, an idea loosely inspired by the brain. “Loosely” matters: it is not a brain and does not work like one in detail, but a mathematical structure that borrows a little vocabulary from biology.

A network is made of simple units, sometimes called neurons. Each takes in numbers, combines them, and passes a number on. What makes one connection count more than another is a weight — a number that dials its influence up or down. One unit does something trivial; wire millions together and the combination can represent extraordinarily complex patterns. The units sit in layers: an input layer that receives the data, one or more hidden layers, and an output layer that gives the result, with information transformed a little at each step. “Deep” learning simply means many hidden layers — depth lets early layers pick up simple features (edges, sounds, letters) and later layers combine them into complex ones (faces, words, meaning).

All the knowledge a network has lives in its weights. The architecture — how the units are wired — is designed by people. The weights are not; they are learned.

Training versus inference: learning versus using

A neural network works in two very different phases, and confusing them causes a lot of misunderstanding.

Training is the learning phase. The network starts with random weights and is fed vast amounts of data. Each time it makes a prediction, its answer is compared with the desired one and every weight is nudged slightly to shrink the error next time. Repeat this billions of times and the weights settle into values that capture real patterns. Training is done once, is enormously compute-intensive, and is where nearly all the cost and energy of building a model goes.

Inference is the using phase. Once training finishes, the weights are frozen; running the model on a new input is inference. Every time an assistant answers a question, that is inference on an already-trained model — far cheaper per use than training, though across hundreds of millions of users it adds up.

One consequence follows directly: a trained model does not keep learning from your conversation unless it is deliberately retrained or given external memory. By default, what it knows was fixed at training time — which is why models have a “knowledge cutoff” and can be unaware of recent events.

How models learn from data

Machine learning is only as good as the data it learns from, and there are three broad ways to learn.

  • Supervised learning uses labeled examples — inputs paired with correct answers, such as photos tagged “cat” or emails marked “spam.” The model learns to reproduce the labels, then generalizes to new cases. It is the most common and reliable approach, but it needs someone to produce the labels.
  • Unsupervised learning uses data with no labels. The model finds structure on its own — grouping similar items, spotting anomalies, surfacing patterns nobody named in advance. It is useful precisely when you do not know what you are looking for.
  • Reinforcement learning has no answer key. An agent acts, receives a reward or a penalty, and adjusts to earn more reward over time, the way a person learns by trial and error. It underlies much game-playing AI and robotics, and a variant helps make assistants more useful.

In every case the data is not a minor detail. A model absorbs the patterns, gaps, and biases of whatever it was trained on. If the data is skewed, the model will be too — which is why the composition of training data is one of the most consequential and scrutinized choices in the field.

Large language models and next-token prediction

The systems behind today’s AI assistants are large language models (LLMs): deep neural networks, usually built on an architecture called the transformer (introduced by researchers in 2017), trained on an enormous amount of text.

Their core skill is simple to state: predict the next token. A token is a chunk of text — often a whole word, sometimes a fragment of one. Given a stretch of text, the model outputs its best guess for what comes next, appends that token, and repeats, one token at a time, until the answer is complete. The reply you read back from an assistant was generated left to right, each token conditioned on everything before it.

This is where parameters come in. A parameter is just a learned weight, and an LLM’s ability to predict well lives entirely in its parameters. Modern large models have billions of them, and the largest run into the trillions, though exact counts for the newest frontier models are often not disclosed. For a sense of scale, a widely cited model from 2020 had 175 billion parameters; leading systems since have grown well beyond that.

One subtle point: LLMs are trained by self-supervision. Nobody hand-labels the text; the “correct answer” is simply the word that actually came next, which the model predicts with the rest hidden. Because the label comes free from the text itself, LLMs can learn from essentially the entire public written record.

ModelThe trained system itself: the learned settings that turn an input into an output.
WeightOne adjustable number inside a network. Learning means tuning these.
ParameterAnother word for a learned weight. Large models have billions or trillions of them.
TokenA chunk of text a model reads and writes — often a word or part of a word, and on average roughly three-quarters of a word in English.
TrainingThe one-time, compute-heavy process of learning the weights from data.
InferenceUsing the finished model to answer a prompt. This is what happens each time you use an assistant.

A raw next-token predictor is not yet a helpful assistant; left alone it will continue text in unhelpful or unsafe ways as readily as useful ones. Turning one into an assistant takes further steps — instruction tuning on examples of good responses, and reinforcement learning from human feedback, in which people rate answers and the model is adjusted toward the ones they prefer. That is the reinforcement idea from earlier, applied to behaviour rather than to a game.

Why scale changed everything

For most of AI’s history, bigger did not reliably mean better. With language models it did. Researchers found that increasing three things together — training data, computation, and the number of parameters — produced steady, surprisingly predictable gains in performance. These patterns are known as scaling laws.

More striking, at large enough scale some models began handling tasks they were never explicitly trained for: translating, summarizing, writing code, working through multi-step problems. These are sometimes called emergent capabilities, though the term is debated — some argue the jumps only look sharp because of how the abilities are measured. What is not disputed is that the leap in scale from roughly 2018 into the mid-2020s turned language models from a research curiosity into general-purpose tools.

Scale is also why AI became so bound up with hardware and energy: training a frontier model means running large clusters of specialized processors for weeks or months, which is a subject in its own right.

What these systems can and cannot do

Language models are genuinely capable: they draft and edit text, translate, summarize long documents, write and debug code, explain ideas, and hold a coherent conversation. Used well, they are among the most flexible tools computing has produced. But their design creates specific, predictable limitations worth understanding plainly.

Hallucination

Because a model generates the most plausible continuation rather than a verified one, it can state false things with complete fluency — inventing a citation, a date, or a quotation that never existed. This is called hallucination, and it is less an occasional bug than a byproduct of how the system works: it is always predicting likely text, and likely is not the same as true.

Why fluent and wrong go together. A language model has no separate store of facts it checks answers against. It produces words that fit the pattern of a correct answer, which usually — but not always — coincides with one. Fluency is therefore a poor guide to accuracy, which is why connecting models to search, databases, and calculators (giving them grounding) is a major focus of current work.

Weak grounding

By default a model has no direct link to the world. It was trained on text and, unless connected to live tools, reasons only from patterns in that text: it does not inherently know today’s date, cannot see a web page it was not given, and has no senses. Much recent engineering is about bolting on that missing connection — web search, software tools, and access to private documents at the moment of answering.

Sensitivity to how you ask

The same question, phrased two ways, can produce different answers. Because the model is continuing your text, the wording, order, and framing of a prompt genuinely change the output. This is why “prompting” became a skill worth practicing, and why small rewordings sometimes fix — or break — a response.

Do they actually understand?

This is the honest open question, and it deserves an even-handed answer. On one side, these systems manipulate symbols they have no grounded experience of, hold no goals or awareness, and fail in ways no understanding creature would — so “understanding” overstates the case. On the other, they solve genuinely novel problems, track context across long exchanges, and generalize well beyond what they memorized, which is hard to dismiss as lookup. A reasonable middle view: large models have developed real competence at prediction and pattern-completion that reproduces much of the behaviour of understanding, while whether anything is understood the way a person understands it remains genuinely unsettled.

Frequently asked questions

What is the difference between AI, machine learning, and deep learning?

They are nested inside one another. Artificial intelligence is the broad field of building systems that perform tasks associated with human intelligence. Machine learning is a subset in which systems learn patterns from data instead of following hand-written rules. Deep learning is a subset of machine learning that uses neural networks with many layers, and it powers most of today's notable AI, including the models behind AI assistants.

What does it mean that a language model predicts the next token?

A token is a chunk of text, often a whole word or part of one. A language model reads the text so far and outputs its best guess for the next token, adds it, and repeats one token at a time until the response is finished. Everything an assistant writes is produced this way, each token conditioned on the ones before it.

What is the difference between training and inference?

Training is the one-time learning phase, in which a model is fed large amounts of data and its internal weights are adjusted until it predicts well. It is very compute-intensive. Inference is using the finished model by giving it a prompt and getting an answer. Every time you use an assistant you are running inference on a model whose training already happened.

Why do AI models sometimes make things up?

Because they generate the most plausible continuation of text rather than a verified one. A language model has no separate store of facts to check against, so it can produce fluent, confident statements that are false, sometimes inventing a citation or a date. This is called hallucination, and it is a byproduct of how the system works rather than an occasional glitch.

Do large language models actually understand language?

It is genuinely debated. They have no grounded experience, goals, or awareness, and they can fail in ways an understanding person would not, which argues against calling it understanding. Yet they solve novel problems and track context well beyond memorized examples, which is hard to dismiss. A common middle view is that they have real competence at prediction that reproduces much of the behaviour of understanding, while whether they understand as a human does remains unsettled.

Why did AI suddenly get so much better?

Mainly scale. Researchers found that increasing training data, computation, and the number of parameters together produced large and fairly predictable gains, a pattern known as scaling laws. At sufficient scale, models began handling tasks they were not explicitly trained for, such as translation and writing code. The leap in scale from roughly 2018 into the mid-2020s turned language models from a research curiosity into general-purpose tools.

Related reading

Continue the high-level view: A high-level history of AI, What AI runs on, What AI is used for, Where AI is heading, and How AI decides what to recommend.