An Electroencephalogram (EEG) is a diagnostic test that measures the electrical activity of the brain. It is commonly used to diagnose conditions affecting the brain, including epilepsy, sleep disorders, and brain tumors. During the procedure, electrodes are placed on the scalp to detect electrical impulses produced by brain cells.