is it just on one side?
As has been mentioned above, riding position is critical eg moving my saddle a few millimetres forward made a huge difference to the strain I felt in my arms because less weight was taken by my arms.
I am no expert but could you have pulled a muscle? I sometimes get that especially if I go out and my muscles are cold. My guess is that it is pulled muscle or muscle strain if you only get it in one position and it is only on one side.
The other scenario I get is when I have done a long ride (over 50 or 60 miles) I am sometimes sore at the base of the back of my neck for a few days, simply because I have been in the same position with my head up for so long (I ride a road bike not a mountain bike). That ache is there no matter what position my head or neck are in.
At the risk of blabbering on, what clothing are you wearing? Having the right gear can be expensive but it makes a huge difference. If you are getting a chill down your neck that could be a cause.
It could be that you are just seriously unfit, of course! Bottom line? If it isn't getting better get proper medical advice!
HTH