hi,thanks for query.There could be various reason for this,the commonest the reason being some sort of muscular sprain
.As this is associated with movement this is more likely.Apply some local analgesic
over the area and take any tablets that suits you orally also.This should help.Take some rest and you will be fine.In case you have chest pain
,perspiration,discomfort etc,then you need to see a doctor for examination to see for any cardiac problem.
wishing you good health.