An electroencephalograph, or EEG for short, is a medical device designed to measure electrical activity of the brain. Usually, this can only be done indirectly, but measuring the electrical resistance of the skin above the skull. However, even this measurement can reveal a great deal about brain activity and whether it is normal compared to other patients. It's commonly used to diagnose neurological diseases, such as epilepsy, and can be used overnight to diagnose sleep disorders.
The lack of EEG activity, or "brain death" is the standard definition of death for legal and medical purposes.