What are they for?
They are used for AI
How it works?
You have to find the combination that best fits is to "train" the neural network. An already trained network can then be used to make predictions or classifications, that is, to "apply" the combination.
A perceptron is an element that has several entries with a certain weight each. If the sum of these entries for each weight is greater than a certain number, the output of the perceptron is a one. If it is smaller, the output is a zero.
In our example, the entries would be the two test scores. If the exit is one, it is approved. If it is zero, suspense. Weights are what we have to find with training. In this case, our training will consist of starting with two random weights and see what the neural network results for each student. If it fails in any case, we will adjust the weights little by little until everything is properly adjusted.
For example, if a student with a very good grade in the second exam has suspended the course, we will lower the weight of the second exam because it clearly does not influence too much. Little by little we will end up finding the weights that fit the notes that the teacher put. The idea of adjustment or feedback is to adapt the network to the "hidden" information that the data we have so that it learns.
This has only been an example, neural networks can be used for everything you want to know, with many data and certain algorithms can know many things, and the more you learn the neural network more complex being.