A neural network is a function built by stacking simple pieces. Each unit takes a weighted sum of its inputs, adds a bias, and passes the result through an activation function. Units are arranged in layers: the first reads the raw input, the last produces the prediction, and the hidden layers in between turn simple features into richer ones.
The weights are what the network learns. Training nudges millions or billions of them so the output moves closer to the right answer, using backpropagation to work out which way each weight should move. The name is only loosely borrowed from neuroscience; modern networks are guided by math and engineering, not by how brains work.
Why layers and nonlinearity matter
Without the activation function, stacking layers gains nothing: a chain of weighted sums is still one weighted sum. The nonlinearity between layers is what lets depth build up curved, intricate decision boundaries.
That’s also the idea behind the universal approximation theorem: a network with even one hidden layer can, in principle, approximate a very wide class of functions if it’s wide enough. The textbook’s caveat is the important part: the theorem promises such a network exists, not that training will find it, or how large it must be. In practice, depth tends to be the more efficient way to get there.
From perceptron to today
Frank Rosenblatt’s perceptron (1958) was a single trainable unit. Training networks with hidden layers became practical once backpropagation was popularized in 1986. Today’s architectures are specialized arrangements of the same parts: a CNN shares weights across an image, and a transformer lets every token attend to every other.
The catch
A trained network is a very good pattern-matcher over the data it saw, and it offers no built-in guarantee outside that range. Its knowledge is spread across millions of numbers, which makes it hard to inspect, and big networks need a lot of data and compute to train. Stacking many layers is what’s called deep learning.