The substantia nigra (SN) is a functional unit of the brain that is participates in the control of 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 at which you could view the brain if you had MRI vision. It sits at the top of the mesencephelon just below the hippocampus (midbrain) and is thus an evolutionarily early structure in the central nervous system. Although it is actually a part of the brainstem, it is regarded as one of the three parts of the basal ganglia because of its function and the way its cells are interconnected with other brain areas.
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.
*The Latin substantia nigra means 'black stuff' (thank you, creases. "Gotta love exact terminology."). However, this brain structure only becomes dark after exposure to air. In situ, it’s not actually dark at all. (For this important fact, we thank paraclete.)
http://biology.about.com/library/organs/brain/blbasalgan.htm
http://www.umanitoba.ca/faculties/medicine/anatomy/snjb.htm