An EEG records electrical activity in the brain using electrodes placed on the scalp. It is used to diagnose epilepsy and other neurological conditions. During an EEG, electrodes detect voltage fluctuations corresponding to different brain wave patterns such as delta, theta, alpha, and beta waves. Abnormal wave patterns can indicate conditions like epilepsy. EEGs provide high temporal resolution to study brain activity but low spatial resolution. They are a non-invasive way to monitor brain function.