Its possible you may have supraventricular tachycardia (svt). Svt mainly starts and ends suddenly. Normal heart beats can be around 70-80 and with svt, the heart can beat anywhere from 150 to 300 beats per minute. Symptoms can be lightheadeness and chest pain. Episdodes usually last less than a miniute but some can last longer.
Among the possible causes are valve disease, hardening of the arteries, thyroid disease, or heart failure. Other causes include drinking too much alcohol, smoking too many cigarettes, or using too much caffeine.
If another episode occurs, bear down (like tying your shoe) and strain lightly. This will bring your heart rate close to a normal beat.
If you do have svt, it is curable. Do not to ignore the problem, check with your doctor.