Neural Nets

What Is a Neural Network, Explained Simply: How It Works and Learns

"Neural network" is everywhere these days — but what actually is it: a program, a brain, some kind of magic? Let's build it up from zero: what an artificial neuron is made of, why it needs layers and weights, and how a pile of numbers suddenly starts recognizing cats in photos and writing text. No formulas, no scary jargon.

A white humanoid robot on a purple-and-blue background — an image of AI powered by neural networks
A neural network is neither a robot nor a brain — it is a mathematical model that learns from examples. Photo: Pexels

What a neural network is, in plain English

A neural network is a program that learns from examples instead of following rules written in advance. That is its core difference from ordinary code. A classic program is written step by step: "if the user clicks the button, open a window." But how do you write the rule "this is a cat"? A cat has no fixed checklist: it can be ginger or black, face-on or in profile, sitting or leaping. Listing every case by hand is impossible.

A neural network solves the problem differently. You show it thousands of photos labeled "cat" and "not cat," and it works out the patterns on its own: rounded ears, whiskers, the shape of a face. Nobody dictates rules to it — it derives them from the data. That is exactly why neural networks excel where an explicit instruction is nearly impossible to write: recognizing a face, translating a phrase, reading text aloud, painting in a picture.

In short

A neural network is "a learner, not an executor." To a normal program you give rules; to a neural network you give examples. It builds the rules itself by tweaking millions of internal numbers until it starts answering correctly.

The artificial neuron: a sum and a gate

The name "neural network" is borrowed from biology, but an artificial neuron is far simpler than a living one. It is essentially a tiny calculator with a single job: take a few numbers as input, mix them, and output one number. That is it.

It works in two steps. First, the weighted sum: each input has its own weight — a number saying how important that input is. The neuron multiplies each input by its weight and adds the results together. Imagine deciding whether to go for a walk: the weather matters a lot (big weight), while the color of your socks does not (weight near zero). A neuron does exactly this, just with numbers.

The second step is the activation function. This is a gate that decides whether to pass the signal on, and how strongly. Without it, the network could only add up straight lines and could never capture the complex, curved relationships of the real world. The activation function adds "non-linearity" — and that is precisely what lets the network describe genuinely tricky patterns, not just "more or less."

Input
Numbers (pixels, words, features)
Weight
Importance of each input
Summing
Input × weight, then add up
Activation
The gate: let the signal through
Output
One number for the next layer
What changes
The weights — during training

A single neuron is nearly helpless — it can only draw the simplest yes/no boundary. The power appears when there are many neurons and they connect into a network.

Macro shot of Raspberry Pi circuit boards with countless chips and traces — an image of the computation that runs neural networks
A neuron is simple math. The complexity comes from thousands of connections between them, like traces on a board. Photo: Pexels

Layers: turning neurons into a network

Neurons are arranged in layers, and data flows through them like an assembly line. There are three kinds of layer:

  • Input layer — receives the raw data. For a photo that is the brightness of each pixel; for text, the encoded words. Nothing is computed here, just intake.
  • Hidden layers — the heart of the network. This is where all the work happens. There can be one or hundreds: when there are many hidden layers, the network is called deep, and training such networks is called deep learning.
  • Output layer — delivers the result: "cat" with 97% probability, a translated phrase, or the next word in a sentence.

The key idea is the division of labor between layers. Image recognition shows this most clearly. The first hidden layers pick up the simplest things: edges, blobs, strokes. The next assemble them into more complex details — an eye, an ear, a wheel. Deeper layers still handle whole objects: a cat's face, a person's face, a car. Each layer stands on the shoulders of the previous one and works with slightly more abstract concepts. That is how simple math at the bottom turns into recognition of complex things at the top.

An analogy

Picture a row of experts sitting side by side. The first only spots lines and hands them to the second. The second assembles lines into shapes, the third turns shapes into objects. Each is a little smarter than the last, yet useless alone. A network's layers are the same chain of increasing sophistication.

Training: why it all comes down to weights

We said the network "learns." But what exactly changes inside it? The answer is short: the weights. All of a neural network's knowledge is its weights — those importance numbers on every connection. To train a network is to choose millions (in big models, billions) of these numbers so that it produces correct answers. This happens in a loop of four steps.

1

Make a guess

The network gets an example (say, a photo) and runs it through the layers. At the start the weights are random, so the answer is usually wrong: "it's a dog" instead of "cat."

2

Compare to the answer

We know the correct answer. A special formula computes the error — how badly the network missed. The bigger the miss, the bigger the error number.

3

Backpropagation

Backpropagation pushes the error backward through the layers and, for each weight, works out which way and how far to move it so the miss shrinks.

4

A step down the slope

Gradient descent nudges every weight a little in the right direction. "A little" matters: a big jump breaks everything. Then the loop repeats on a new example.

Run this loop millions of times over a huge set of examples, and random numbers gradually become meaningful ones. A lovely metaphor for gradient descent is walking down a mountain in fog: you cannot see the valley floor, but you feel the slope under your feet and take a small step toward where it is lower. The error is the altitude, and the goal is to reach the valley where the misses are almost gone.

A neural network does not "understand" a cat. It has tuned its weights so that pictures of cats reliably light up its output. That is pattern recognition, not consciousness.

Why this actually works

There is a fair question here: why does multiplying numbers suddenly turn into translating text or recognizing speech? The secret is that almost any data is patterns, and patterns can be expressed as numbers. A photo is a grid of brightness values. Sound is a wave of loudness over time. Text is a sequence of words where some tend to follow others. There is hidden structure everywhere, and a big enough network can feel it out.

Three things helped, and they only lined up recently. First, data: the internet provided billions of examples of text and images. Second, computing power: graphics cards (GPUs) can perform millions of simple operations at once, and a network is exactly millions of simple operations. Third, good architectures: ways of wiring layers together that are well suited to images specifically, or to language specifically. Until all three met, neural networks remained for decades a beautiful but weak idea.

A close-up motherboard in warm light with capacitors and chips — the computing foundation for training neural networks
Training large networks became possible once graphics cards learned to do millions of operations at once. Photo: Pexels

Where neural networks are already around you

The word sounds futuristic, but neural networks have long been in your pocket — quietly and invisibly:

  • Your phone. Face unlock, "smart" photo enhancement, voice typing, in-camera live translation — all neural networks.
  • The web. Recommendation feeds, spam filtering in email, search suggestions, automatic video subtitles.
  • Creativity. ChatGPT writes and explains; Midjourney and similar tools paint images from a text description; networks remove backgrounds and upscale old photos.
  • Medicine and science. Finding tumors in scans, predicting protein shapes, deciphering ancient texts.

If you are interested in the visual side — how networks create and deliver images — start with our piece on what format AI images use, then read up on how to detect an AI image from its metadata.

Working with images from neural networks?

An image from Midjourney or DALL·E often needs to be converted to another format — for print, the web, or social media. FormatZ converts files right in your browser, with no install and no sign-up.

Open the converters

Three myths worth dropping

There is a lot of noise around this topic, so let's set the record straight right away.

Myth 1: "A neural network thinks like a human." No. It finds statistical patterns in data. It has no grasp of meaning, no intentions, no consciousness — just tuned weights that predict the answer well.

Myth 2: "A neural network is always right." Also no. A network is confidently wrong if the data it trained on was skewed or incomplete. It reflects what it learned from — including other people's mistakes and biases.

Myth 3: "It's too complex to understand." As you can see — no. Neuron, layers, weights, training by shrinking the error. There is plenty of math inside, but the basic idea fits on one page, and you have just read it.

Keep in mind

A neural network is a mirror of its data. Feed it one-sided examples and you get one-sided answers delivered with full confidence. So it pays to treat AI answers critically and double-check anything that matters.

You now have the framework that everything else about AI can hang on. Want to know how the same machinery becomes a conversation partner? Read how ChatGPT and language models work. And if you are curious how networks paint, here is our breakdown of generative AI.

Only as a very loose metaphor. The idea of connected neurons was indeed borrowed from biology, but an artificial neuron is simple math: add up the inputs times their weights and pass the result through an activation function. A real brain neuron is millions of times more complex, and the network has no understanding or consciousness at all.
A weight is a number that says how important a particular input is to a neuron. The bigger the weight, the more that signal influences the answer. Weights are exactly what changes during training: the network tweaks millions of these numbers until it starts giving correct answers. In effect, all of a network's knowledge is its set of weights.
Training means showing the network many examples with correct answers and making it gradually adjust its weights so the error gets smaller. The network makes a guess, compares it to the right answer, computes the error, and uses backpropagation to nudge the weights in the right direction. Repeat this millions of times and it learns to find patterns.
A normal program is written by a human rule by rule: if this, then do that. A neural network gets no rules — it gets examples, and it works out the rules itself by adjusting weights. That is why neural networks shine where explicit rules are nearly impossible to write: recognizing a face, translating text, telling a cat from a dog in a photo.
No. To use ChatGPT, Midjourney or a translator you need no math at all. Understanding the basic ideas — neuron, layers, training — helps you write better prompts and set realistic expectations, but you do not need to code or compute gradients for that.