The study of the function of the nervous system, including the electrical and chemical processes that occur in neurons.