How does a neural network work?
Each artificial neuron takes weighted inputs, adds a bias to get a weighted sum, and passes that sum through an activation function to produce its output [1]. Neurons are stacked in layers. The input layer holds the raw features, hidden layers turn them into new representations, and the output layer produces the prediction: a number for regression, probabilities for classification [1].
Weights set how strongly each input affects the result. In training, the network makes a prediction, measures its error with a loss function, sends that error backwards through backpropagation and updates its parameters with gradient descent [1].
Why isn't a linear model enough?
As Google explains, a linear model can't separate data whose decision boundary isn't a straight line, and hand-crafting the right feature crosses for harder datasets takes a lot of effort [2]. Neural networks are a family of architectures built to find these nonlinear patterns, and they learn useful feature combinations during training on their own [2]. The nonlinear activation functions, such as ReLU, sigmoid and tanh, are what make that possible [1].
What does one look like in practice?
In spam detection, features drawn from the words in an email go into the input layer, pass through the hidden layers, and come out as the probability that the message is spam [1]. The idea is older than it looks: McCulloch and Pitts proposed the first mathematical model of a neuron in 1943, and Frank Rosenblatt introduced the perceptron in 1958 [1].