I am trying to learn how Neural Network works on image recognition. I have seen some examples and become even more confused. In the example of letter recognition of a 20x20 image, the values of each pixel become the input layer. So 400 neurons. Then a hidden layer of neurons and 26 output neurons. Then train the network, and then it works, not perfect. 

What confused me about the Neural Network is, how it learns about what's in an image. You don't need to do thresholding,or segmentation, or measurement, somehow the network learns to compare images and recognize. It is like magic to me now. Where to start to learn neural network?