An electroencephalogram (EEG) is a test that measures and records the electrical activity of your brain. Special sensors (electrodes ) are attached to your head and hooked by wires to a computer.