What is a neural network? It is the machine behind almost everything we call modern AI: the chatbot that answers your questions, the camera that recognises your face, the system that translates a whole language in a second. A neural network is a computer program built from layers of simple units, loosely inspired by the neurons in your brain, that learns from examples instead of following hand-written rules. You do not program it with instructions. You show it data, and it works out the patterns for itself. Here is how it works, in plain English.

The brain-inspired idea

The idea is older than computers as we know them. In 1943, Warren McCulloch and Walter Pitts proposed a mathematical model of a brain neuron: a cell that adds up the signals it receives and fires if the total passes a threshold. In 1958, Frank Rosenblatt built the perceptron, the first machine that could learn to recognise simple patterns. Progress then stalled for decades — the machines were too slow, and the data too scarce.

The breakthrough came in 1986, when Geoffrey Hinton and his colleagues popularised backpropagation, the training method still used today. Then, in 2012, a neural network called AlexNet won an image-recognition contest by a huge margin, and the field exploded. In 2017, researchers at Google published the Transformer architecture, the design behind today's large language models — the systems we explain in our guide to large language models.

The parts: neurons, weights and biases

Strip away the diagrams, and a single artificial neuron does something very simple. It receives numbers as inputs, multiplies each one by a weight, adds them up, adds a bias, and passes the result through an activation function that decides the output. In short:

output = activation (w1×x1 + w2×x2 + w3×x3 + bias)

  • Weights are dials that say how much each input matters. A large positive weight amplifies that input; a weight near zero ignores it.
  • Bias shifts the neuron's threshold — like raising or lowering the bar for firing.
  • Activation functions add the twist that makes the whole thing work. Without them, a network could only learn straight-line relationships. Common ones are ReLU (outputs the input if it is positive, zero otherwise) and sigmoid (squeezes any number into a range between 0 and 1).

One neuron is unimpressive. The power comes from stacking them. A typical network has:

Layer What it does
Input layer Holds the raw data — pixels of a photo, words of a sentence, numbers from a sensor
Hidden layers Transform the data, step by step, into more useful representations
Output layer Produces the final answer — a label, a probability, a prediction

A network with one hidden layer is shallow. With many hidden layers it is deep — and that is where the term deep learning comes from. Modern models have hundreds of layers and billions of parameters. A "7-billion-parameter model" simply means it has 7 billion weights and biases — 7 billion tiny dials, all tuned by training.

How does a neural network learn?

Learning is an optimisation loop, not magic. The same three steps repeat millions of times:

1. Forward pass — make a guess. Data flows through the network from left to right. Each neuron computes its weighted sum and activation, passing the result forward until the output layer produces a prediction — say, "80% cat".

2. Loss — how wrong was it? The prediction is compared with the correct answer using a loss function. If the network said "80% cat" and the photo was a dog, the loss is high.

3. Backward pass — fix the blame. This is backpropagation. Using the chain rule from calculus, the network works out how much each weight contributed to the error, moving backward from the output layer to the input layer. Then gradient descent nudges every weight a tiny step in the direction that would reduce the error.

Repeat that loop over millions of examples, and the weights settle into values that make good predictions on data the network has never seen. That is training. Nobody writes the rules for recognising a cat; the network discovers them — edges first, then shapes, then ears and whiskers — layer by layer.

The main types you will meet

Not all neural networks look the same. Each type is built for a different kind of data:

  • Feedforward networks — the basic design. Data flows in one direction, input to output. Good for simple classification.
  • Convolutional neural networks (CNNs) — built for images. They scan for local patterns like edges and textures, which is why they power face recognition and medical scans.
  • Recurrent neural networks (RNNs) — built for sequences, like speech or text, by remembering what came before. Largely replaced by transformers for language, but still used in some places.
  • Transformers — the architecture behind ChatGPT, Gemini and Claude. They weigh the relationships between all parts of an input at once, which is why they handle long text so well.
  • Generative networks — built to create new data: images, music, video and text.

Where neural networks shine — and where they fail

Neural networks are now woven into daily life: spam filters, voice assistants, photo search, medical imaging, fraud detection, translation, and the chatbots that answer your questions. They are good at tasks where the pattern is hard to describe in rules but easy to show in examples — exactly the tasks humans find intuitive and computers used to find impossible.

They also have real limits, and honest explainers should name them:

  • They need enormous amounts of data. A child learns what a cat is from a few examples. A network needs thousands.
  • They are black boxes. You can inspect every weight, but explaining why a network made a decision is still hard — which is part of why AI systems sometimes produce confident nonsense, as we explored in our article on why AI chatbots make things up.
  • They are confident even when wrong. A network's output is a probability, not a guarantee — and it can be very sure about a very wrong answer.
  • They are expensive to train. Training a large model takes weeks on thousands of specialised chips and a great deal of electricity.

A mathematical result called the universal approximation theorem, proven in 1989 and 1991, says a network with just one hidden layer and enough units can approximate any continuous function. In practice, "enough units" can mean an impossible number, and finding the right weights is the hard part. The theorem tells us what networks can represent. Training is what decides whether they actually learn it.

Takeaway checklist

  • What it is: a neural network is layers of simple units that learn patterns from data by adjusting connection strengths (weights).
  • The idea: loosely inspired by brain neurons — McCulloch and Pitts, 1943; the perceptron, 1958.
  • The parts: neurons, weights, biases and activation functions, arranged in input, hidden and output layers.
  • How it learns: forward pass (guess), loss (measure the error), backpropagation and gradient descent (fix the weights) — repeated millions of times.
  • Deep learning just means a network with many hidden layers.
  • The main types: feedforward, convolutional (images), recurrent (sequences), transformers (language), generative (creating new content).
  • The limits: needs lots of data, hard to explain its decisions, inherits bias from training data, and can be confidently wrong.
  • Why it matters: it is the engine inside chatbots, image recognition, translation and almost every modern AI system you use.

Hamza

Founder & Editor, TechToday

Hamza is the founder and editor of TechToday. Hamza writes about artificial intelligence, computing, security and the technology shaping everyday life, with a focus on explaining complex ideas in plain, honest language — clear answers for curious readers, without the hype.