How Artificial Intelligence Works
Data, training and neural networks in plain language — and where AI has limits
Artificial intelligence writes texts, recognizes faces and recommends what to watch next. It can feel like magic, but under the hood there is a surprisingly simple idea: learning patterns from examples. This explainer shows how that works — without formulas.
What AI is — and what it is not
— From hand-written rules to learning from data
For decades, programs followed rules written by people: if the email contains “win a prize”, mark it as spam. Modern AI works differently. Instead of rules, it gets thousands of examples — spam and normal emails — and finds the patterns itself. It does not understand the world the way people do; it calculates what is most likely given what it has seen.
Rules
People write the logic. Predictable, but breaks on cases nobody thought of.
Machine learning
The program learns patterns from labeled examples and applies them to new data.
Generative AI
Models trained on huge amounts of text or images create new content from a prompt.
We can only see a short distance ahead, but we can see plenty there that needs to be done.
How a model learns
— Data in, patterns out
Every AI system goes through the same stages. Click the markers to see what happens at each one.

1
Collect data
Gather examples and label them: “cat”, “dog”, “spam”, “not spam”.
2
Train
Show the examples to the model over and over until its guesses stop improving.
3
Test
Check the model on examples it has never seen to measure real accuracy.
4
Use
Put the model to work on new data in a product.
5
Improve
Collect mistakes, add new data and retrain.
Inside a neural network
— Layers of simple calculations
A neural network is a chain of layers. Each “neuron” takes numbers from the previous layer, weighs them and passes the result on. Training adjusts the weights so that the final answer matches the examples more and more often.
Receives raw data as numbers: pixels of a photo or words of a sentence turned into numbers.
| Task | What it does | Example |
|---|---|---|
| Classification | Puts input into categories | Spam filter |
| Prediction | Estimates a number | Delivery time forecast |
| Recommendation | Suggests what you may like | Next video to watch |
| Generation | Creates new content | Drafting an email |