The two main causes of syncope are cardiac arrhythmias and neurocardiogenic syndromes. In both of these conditions, blood circulation to the brain is reduced, resulting in temporary loss of consciousness.
You ask about neurocardiogenic: In this condition blood vessels tend to expand, which leads to pooling of blood in the lower parts of the body. As a result, less blood reaches the brain and this causes fainting. The usual stimulus for this action resides in the nerves of the heart-hence the term neurocardiogenic. A head-up tilt test can uncover the underlying cause of the fainting in this syndrome. Neurocardiogenic syncope is usually treated with medications that reduce the probability of cardiac nerves triggering the cycle that leads to lightheadedness, dizziness or fainting.