It seems you might be suffering from some muscular strain.
For this you have to do some physiotherapy
like cervical isometric exercises to relax the muscle.
You have to correct your posture while sitting during studies. Stretch your neck & back muscles , stretch your arms between your studies.
If pain persists you should visit an orthopaedician for clinical exam & inv if required.