Well the best thing is to go and see your doctor.
But it might be precordial catch syndrome(PCS).
This means you might have a pinched nerve somewhere due to the fact that it appear and disappears.
But you should visit your doctor to see if everything is fine.
Hope everything is ok, and keep us posted.
Chest pain is a serious matter and should be checked out immediately. It could be your heart or your gall bladder/liver causing the pain depending on what side the pain is in. Try to remember all the things happening when the pain starts and if there is anything that help soothe the pain.
Go to the doctor!!!!!
Pain is the body's way of alerting us that something is wrong. Listen to your body! As gemini said, it may not be serious but better to err on the side of caution. I hope everything turns out OK!
It's always a good idea with chest pains to aire on the side of caution and get them checked out, especially if it keeps returning and lasting longer than before.
It may be nothing, but I would say much better to be safe than sorry. Get it checked out as soon as possible.