Dementia is a loss of brain function that occurs with certain diseases. It affects memory, thinking, language, judgment, and behavior. Most types of dementia are nonreversible (degenerative). Alzheimer's disease is the most common type. Dementia usually occurs in older age. Medications may be needed to control behavior problems caused by a loss of judgment, increased impulsivity, and confusion.