Well first of all, if you had a heart attack you would certainly know it.
Heart attacks are caused (pretty much 99% of the time) by a long, long history of inactivity, smoking and bad diet and alcoholism, which lead to things like high cholesterol, dyslipidemia and hypercalcemia in your arteries, which lead to blockages over a period of a few decades, and left untreated can cause blood clots in your coronary arteries leading to the heart, hence leading to a heart attack since fresh blood is essentially cut off, starving your heart of oxygen. This leads to damage to the muscle tissue of your heart which can negatively affect its function.
You can go to your doctor and have a resting EKG done, or a stress test and this in and of itself can tell a lot about how healthy your heart is. You can also have an echocardiogram to look at the structure of your heart.
Overall, if your heart is healthy (which it probably is if you are young and have no untreated conditions like high cholesterol or high blood pressure) then the random skip or thump you feel is a normal phenomena that has occurred probably at least once in every person out there. Many, many things with total innocent, benign backgrounds can cause a PVC, PAC, or PJC (all types of premature beats, originating from different parts of your heart) randomly, whether at rest or when exerting yourself.
Just to clarify in case you're wondering, any ectopic beat, whether it is a PVC, PAC, or PJC (premature ventricular, atrial, or junctional contractions) will NOT cause damage to your heart. Think of an ectopic beat as a hiccup in your heart's rhythm, that's pretty much all they are.
How do you know when there's damage
As long as their is no myocardial damage (like from a heart attack) then ectopic beats, whether from the atrium or ventricles, are harmless and are no more than a funky sensation in your chest. Its when there is damage to the muscle, then nerve impulses don't conduct properly and can lead to erratic tachyarrythmias like sustained ventricular tachycardia.
In an undamaged, healthy heart, atrial or ventricular ectopy (misplaced beats from the upper and lower chambers respectively) won't do anything except maybe make you notice the skip or thump, or slight irregularity. Its when there is damage to your heart muscle and there are multiple PVC's going on at a high rate where they warrant medical attention.
Ectopics may come and go at random, or sometimes when in a certain posture they may be more inclined to happen.