You could have a heart rhythm abnormality called atrial fibrillation. This is actually quite common and not dangerous when there are no symptoms other than palpitations. The other possibility is frequent premature beats. Repetitive premature electrical activity in the upper chambers (premature atrial beats) or lower chambers (premature ventricular beats) of the heart would cause palpitations that would feel similar to atrial fibrillation.
If you otherwise feel well and just have palpitations, stop what you are doing, sit or lie down, and take some slow, deep breaths.
If the palpitations persist, call your doctor's office for advice. If the palpitations do resolve quickly, you still might want to mention this to your doctor. You definitely want to notify your doctor if this is a recurrent problem.
Please provide feedback to help us improve the Drugs.com Symptom Checker.