The EEG measures electrical activity in the brain produced by excitatory and inhibitory postsynaptic potentials from pyramidal cells in the cerebral cortex. It does not record individual action potentials. EEG waveforms reflect the summation of PSPs and can appear rhythmic or arrhythmic depending on the synchronization of neuronal activity. Factors like voltage, area of involvement, synchrony, and dipole location affect EEG waveforms. EEG is useful for detecting abnormal epileptiform patterns associated with seizures like spikes, sharp waves, and spike-and-wave discharges that help classify seizure types as partial or generalized.