What does a heart attack feel like and how can you tell that it is not just heartburn?

You can't. Classic symptoms include central chest pressure, left arm or jaw pain, nausea, lightheadedness, shortness of breath, and sweating. Any or all symptoms could represent a heart attack. If you are worried you should see a doctor.
Chest pain.... Classically it is precordial chest pain, but atypical presentations are common. The only way to tell for sure it is not a heart attack is to be evaluated.