Brain cells communicate with each other and the outside world via electrical activity. This can be recorded in various ways, ranging from the insertion of electrodes to the recording of induced magnetic fields. For consumer neuroscience, only fMRI and EEG are relevant.
Functional Magnetic Resonance Imaging is the most powerful technique to record activity from the whole human brain at once and at millimeter resolution. It is the only technique that has been proven to predict behavior beyond questionnaires or self-report, and in numerous situations, ranging from the buying of products or the effectiveness of ads, to the following of medical advice. This is because only with fMRI, the deep neural structures can be recorded that determine the choices people make.
With Electro-Encephalo-Graphy, electrical activity can be recorded from the more superficial parts of the brain. It has the advantage of high temporal resolution, yet it is difficult to assess from what parts of the brain these signals originate. EEG is particularly useful to measure visual attention, and how this fluctuates from second to second.