An electroencephalogram (EEG) is a non-invasive test that measures the brain's electrical activity using electrodes placed on the scalp, primarily used to diagnose conditions like epilepsy, sleep disorders, and brain dysfunctions. The results can show normal or abnormal activity, with specific patterns indicating various neurological conditions, and the procedure involves lying still while the electrical signals are recorded. Additionally, magnetoencephalography (MEG) is highlighted as a functional imaging technique for localizing brain activity and is increasingly used in preoperative evaluations for epilepsy and tumor surgeries.