An electroencephalogram (EEG) is a test to find problems in the electrical activity of the brain. Read on to learn what happens before, during, and after the test.