pain in the neck can be due to a lot of reasons.
It can be infection, trauma etc.
I would advise you to consult a orthopedician. Get a x ray
of the neck also. In the mean time avoid strenuous exercise. I hope i have answered your query. Take care