Thanks for writing your query.
Pain in the back side of head and neck associated with nausea or vomiting
can suggest towards Cervical spondylosis
as one cause.
You should get a MRI scan done of your head and neck and get yourself examined by an orthopedic surgeon and a Neurophysician.
You can take pain killer and muscle relaxant
along with antacid
for relief from your symptoms of pain. Medicines should be taken under medical supervision only.
You can aplly local pain relieving gel after hot fomentation on neck for relief of pain.Physiotherapy
will also be helpful and you can take advice from your treating doctor about the precautions to be followed. Avoid sleeping on thick pillows and also avoid posture which strains your neck.
I hope this is helpful to you.