The substantia nigra (SN) is a part of the brain that helps control intentional movement and affects thinking and mood by producing the neurotransmitter dopamine (wonderful brain happy drug). By releasing dopamine in areas of the cortex, particularly the frontal areas, SN plays an important role in rewarding behavior (positive reinforcement learning), planning for future benefit over immediate rewards and encouraging memory formation.
SN is a long dark arc of brain cells* that is located near the top of the brain stem, nearly straight back from the eyes. It would appear to be at the center of the brain mass, pretty much from any angle from which you could view the brain if you had MRI vision. It sits at the top of the mesencephelon (midbrain) just below the hippocampus. SN has two parts, the pars compacta (dense part) and the pars reticulata (reticulated part). The pars compacta does most of the dopamine work. Its neurons lead mostly to the striatum, which more directly affects planned movements, and to the brain’s reward system. It is also heavily involved in recognition of new things in sensory experiences and unexpected happenings in general (surprises). The pars reticulata also does some dopamine work, but acts mostly by producing GABA, a different neurotransmitter. It connects to other parts of the brainstem, the pars compacta and the thalamus. It strongly affects body orientation and eye movements.
Destruction of cells in the SN is typical in Parkinson’s disease and epilepsy. The dopamine cells may relate to depression and schizophrenia.
*Substantia nigra means 'black stuff' in Latin. However, this brain structure only becomes dark after exposure to air (which you really don't want to happen to yours). In situ, it’s not actually dark at all.