Depending on your age, it could be an anxiety
attack. You could also be severely dehydrated. Make sure you drink plenty of water, the .less water in your body, the harder your heart has to work to keep your blood pressure stable and keep you hydrated and etc..but, whenever there is anything that involves you heart, it's best to see a doctor just to make sure everything is okay. You sound like a young person so I doubt that it could be symptoms of a heart attack
. Also look into your family history. Ask your parents if they ever have/had any heart problems. Good luck.