Electroencephalography (EEG) is a technique used to record the electrical activity of the brain. It involves placing electrodes on the scalp to detect and amplify the electrical signals produced by neuronal activity. These signals are then used to create an EEG waveform, which can be analyzed to understand various aspects of brain function.