Palpitations are incredibly common and often caused by stress. They can be frightening, but the younger the person the more likely they are not serious. The first thing to do is to check your pulse (NHS – How Do I Check My Pulse?). Is your heart speed ok (under 100) and your heart rhythm regular? If so, things are probably fine. Look into your lifestyle as smoking, alcohol, caffeine and recreational drugs can cause palpitations.
There are a large variety of other causes for palpitations and some simple examinations and tests can give certainty. Your GP is usually well versed to do so. However, if you have a sudden onset of a very fast heart rate or a very irregular heart rate you may have to go to call 111 or 999 unless your other symptoms are only mild in which case a same day appointment with the GP is acceptable.