An electroencephalogram (EEG) is a recording of brain activity. During the test, small sensors are attached to the scalp to pick up the electrical signals produced when brain cells send messages to each other. These signals are recorded by a machine and are looked at by a doctor later to see if they're unusual.