These conditions get caused by a wrong playing technique, not stretching, not warming up,..., maybe even by playing too long, not sure about that.
This stuff is certainly not something to neglect, cause it can mess up your playing completely, and may even force you to stop playing.
Greetz, TK