EEG measures electrical activity in the brain through electrodes attached to the scalp. It is essential for diagnosing epilepsy, sleep disorders, and assessing brain function in various neurological conditions.