Artificial neural networks (ANNs) operate by simulating the human brain. ANNs consist of interconnected artificial neurons that receive inputs, change their internal activation based on weights, and send outputs. Backpropagation is a learning algorithm used in ANNs where the error is calculated and distributed back through the network to adjust the weights, minimizing errors between predicted and actual outputs.