I have been reading about artificle neural network, and I think I got the general idea, except of the part of the training - which is very dominant, I guess.

(I'm talking about back-propagation algorithm) So, the algorithm start from the output layer and moving toward the input layer, and for each neural it calculate the number we want to get, and do with this something.

But how it calculate the wanted number? Well, at the output layer its probably easy, but how its calculated on the other layers?