Electroencephalography (EEG) is a test that measures your brain wave activity. Learn why it's used and how to prepare for the test.