What is the function of the hidden layer in a neural network mapping to?
Dependent variable: Yes, the output variable is dependent value but by being fed what do you mean? (We have a training set and a test set. We feed our model via training set (both independent and dependent values) and then predict the values for the dependent variable in the test set)

There are some features for each sample that are independent like temperature, heart rate, etc. Based upon these independent values, a feature (outcome) is predicted, for instance, whether someone is prone to health issues or not (classification problem). So this output (health issues) that depends on independent features ( temperature, heart rate, etc. is dependent) 

Note: each pair of independent variables might be correlated.



If you are trying to predict if an image is a cat or dog, then the outcome might be different based on what activation function we have chosen. for instance, if we have chosen sigmoid activation function, the output would be two probabilities, determining the probability of cat and dog. But if we use the threshold function, it gives 0 or 1.



Actually, the way in which the hidden layers are acting in a neural network varies for different sort of layers like Dense, convolutional, recurrent, etc.

For instance, Dense layers try to figure out what the weights of the features (independent variables) should be, meaning, how important each feature is in determining the output (dependent variable), and then based upon the function we utilize (sigmoid, rectifier, etc) would return probability of each outcome, binary outcome for dependent variables with two outcomes, etc.

What do you mean by "How do the nodes learn different features rather than the same one?"