A neural network (NN) is a machine learning approach inspired by the human brain that learns from examples. It consists of interconnected nodes that mimic neurons in the brain. NNs learn by assigning weights to connections between nodes and modifying these weights based on examples to develop an understanding of the task. The network learns through a process called backpropagation, where the error is calculated and used to adjust the weights to reduce loss, similar to gradient descent optimization. Common types of NNs include feedforward, convolutional, and recurrent networks.