Code Safari

Chapter 83·Beginner·10 min read

What Is a Neural Network? The Idea Behind Modern AI, in Plain English

Face unlock, translation, ChatGPT — under the hood it's all the same machine: a neural network. A plain-English explanation of what a neural network actually is — neurons, layers, and why numbers in, numbers out is enough to run the modern AI world.

July 7, 2026

Your phone unlocks when it sees your face. Google translates a menu through your camera in real time. ChatGPT writes you a working SQL query. These feel like three different technologies — but under the hood they are the same machine: a neural network. Different sizes, different shapes, same core idea.

This guide is about that idea. Not the hype version, not the math-textbook version — the plain-English mechanics. By the end you'll know what a neural network actually is, what's inside one, how it gets trained, and why they come in different shapes for images, sound, and language.

Let's start with the only definition you'll ever need.

A neural network is a function

Strip away everything and a neural network is this: a machine that turns input numbers into output numbers.

  • In: the pixel values of a photo. Out: a number meaning "97% dog."
  • In: numbers describing a loan application. Out: a number meaning "likely to repay."
  • In: numbers standing for the words so far. Out: numbers scoring every possible next word.

That's it. Numbers in, numbers out. In programming terms, it's a function — a very large one, with a very unusual property: it has millions or billions of adjustable internal dials, and by setting those dials to different positions, the same machine can compute wildly different things. Set them one way, it detects tumors in X-rays. Set them another way, it recommends videos.

Everything must become numbers first

A network can only eat numbers, so the first job in any AI system is conversion:

Real-world thingBecomes
A photoA grid of pixel brightness values — a small image is already thousands of numbers
A sound clipTens of thousands of amplitude measurements per second
A sentenceA sequence of token IDs — numbered word-pieces from a fixed vocabulary
A customerA row of measurements: age, purchases, days since last visit...

This is why AI people say "everything is a tensor" — before any learning happens, reality is flattened into lists and grids of numbers. If you've read our LLM guide, you've seen the text version of this: tokens are exactly this conversion step for language.

The neuron: a tiny weighted vote

Now for what's inside. The basic unit — the "neuron" — is almost disappointingly simple. One neuron:

  1. Receives some input numbers.
  2. Weighs each one — multiplies it by a dial called a weight that says how much this input matters.
  3. Adds everything up.
  4. Decides whether the total is strong enough to pass along.

That's a weighted vote. Think of a bouncer deciding whether to let a signal through: some inputs get a loud voice (big weight), some get a whisper (small weight), some argue against (negative weight). If the combined vote clears the bar, the neuron fires a signal forward.

A single neuron can only draw one crude dividing line through its inputs — useful for almost nothing on its own. A spreadsheet cell could do its job. The entire power of neural networks comes from what happens next.

Layers: stacking votes on votes

Neurons are organized into layers, and layers are wired in sequence:

Input layer — the raw numbers
Hidden layer 1
Hidden layer 2
…more hidden layers…
Output layer — the answer
Signals flow left to right: each layer's outputs become the next layer's inputs.
  • The input layer is just the raw numbers — pixels, token IDs, measurements.
  • Each hidden layer is a row of neurons, every one taking a weighted vote over the previous layer's outputs. Layer by layer, the raw numbers get transformed into more and more useful summaries.
  • The output layer produces the final numbers — one score per possible answer, say.

Here's the crucial intuition: each layer builds on the summaries of the layer before it. In a photo network, early layers end up responding to simple things like edges and patches of color; middle layers combine edges into textures and parts — fur, wheels, eyes; late layers combine parts into whole concepts — "dog," "stop sign." Nobody assigns these jobs; the division of labor emerges. This "features built from features" stacking is exactly what the word deep means in deep learning — many layers, each standing on the last.

Where the "knowledge" lives

So where, in all of this, is the knowledge? If a network can tell huskies from wolves, where is that fact stored?

In the weights — those millions of dials on the connections between neurons. And nowhere else. There is no database of animal facts inside, no rules file, no code that anyone wrote saying "wolves have longer legs." Just numbers on connections, set to particular values. Copy the weights, and you've copied everything the network knows. Reset them to random, and it knows nothing.

This is worth sitting with, because it's the strangest and most important fact in the field: the model is the weights. When you hear that a company "released model weights," that's literally the knowledge being shipped — a giant file of dial positions. We'll open up the neuron's dials properly in the next chapter.

Why such a simple thing conquered the world

A fair question: weighted votes stacked in layers — why is that the technology of the century?

Because of one deep property: given enough neurons and the right dial settings, a layered network can imitate almost any input→output relationship. Any function you can describe — pixels to captions, English to French, symptoms to diagnoses — some setting of some network's weights gets arbitrarily close to it. The network is a universal shape-shifter.

That flips the whole problem of programming on its head:

Classic softwareNeural network
A human writes the rulesThe rules are found as weight settings
Great when rules are known ("tax = income × rate")Great when rules are unwritable ("does this photo contain a cat?")
Behavior is readable in the codeBehavior is buried in millions of numbers
Change it by editing logicChange it by retraining on data

Nobody has ever been able to write down the rules for recognizing a face — humans do it effortlessly but can't articulate how. Neural networks sidestep the writing-down entirely: show examples, adjust dials, and the unwritable rules assemble themselves in the weights. That's the whole revolution. As our Machine Learning guide puts it: the machine learns the rules from data instead of being given them.

About that brain metaphor

The name "neural network" and words like "neuron" and "firing" come from 1940s-era inspiration: researchers modeled a simplified brain cell and wired copies together. The inspiration was real, but be careful with the metaphor today:

  • Real neurons are electrochemical cells of staggering complexity; artificial ones are one multiply-add-decide step.
  • Brains don't learn by anything like the training algorithm used in deep learning.
  • Your brain runs on ~20 watts; training a large network burns megawatt-hours in a data center.

The honest mental image isn't an artificial brain. It's millions of adjustable dials wired between input and output — a machine for holding unwritable rules. That image will serve you correctly through this whole guide; the brain talk mostly serves press releases.

Recap

  • A neural network is a giant adjustable function: numbers in, numbers out, with millions-to-billions of internal dials (weights) deciding what happens in between.
  • Everything the network touches — photos, audio, text — is converted to numbers first.
  • The unit is the neuron: weigh the inputs, add them up, pass the signal on if it's strong enough. A tiny weighted vote.
  • Neurons stack into layers, and layers build features out of the previous layer's features — edges → parts → concepts. That stacking is the "deep" in deep learning.
  • The weights are the model. All knowledge lives in the dial settings, nowhere else.
  • Networks matter because they can imitate almost any input→output relationship — which lets us build software for problems whose rules no human can write down.

Next: we zoom into a single neuron and meet the three moving parts that make the whole machine tick — weights, biases, and activation functions.

What Is a Neural Network? The Idea Behind Modern AI, in Plain English | Code Safari