If you have a history of heart ailments in your family with relatives dying at young ages (ie early 20's to 30's) then you have much to worry about. Additionally, if you were born with a congenitial malformation in your heart (atrial or ventricular septal defects) you could be experiencing some effects due to that. Most ASD's go unnoticed until later in life and don't present intermittent pain in which you describe. There are other heart defects than can cause
heart failure so you should get it checked out if theses type of condition occur in your family.
As far as someones post saying you have
heart disease that is nearly completely bogus. Heart disease such as coronary artery disease is a genetic presusceptibility with compound environmental factors (such as
high blood pressure,
high cholesterol, obesity, etc.) that aid in plaque formation in arteries of the heart. At 17 years of age its extremely unlikely that you have "angina" in which an individual has eluded to above.
My guess is that you are still growing and with growth can come muscle spasms. There are accessory muscle that help you breath in your chest wall called "intercostal muscles." If they spasm or cause some sort of resistance while you breath it can cause sharp uncomfortable pains that can last for a short time or a fairly extended period of time and will be noted when you breathe it. I suggest you pay further attention to these pains so as to be able to explain to your doctor what you are feeling specifically.
Finally,
chest pain isnt a good thing and should always be check out even if it turns out to be benign. Be sure to go see your doctor if it persists but don't stew over whether or not you are having a
heart attack due to coronary artery disease like one above this post may have you believe. ITS VERY UNLIKELY AT YOUR AGE. VERY. Make an appointment with you
primary care physician to calm your fears and to make sure nothing else is going on. Good luck!
PS.. DO NOT LISTEN TO ALEX M's ADVICE. You need to eat LESS saturated fats and cholesterol. Those are huge predominant dietary factors that lead to heart disease. Stay away from both or atleast limit you intake of Sat Fat's and Cholesterol in you diet....