This seems to be wry neck (muscle strain).
Next Steps
Apply a hot water bag (10min twice a day), after applying a hot water bag apply a local analgesic ointment and take mild painkillers. The pain should subside in a 2-3 days...if it does not, get xray Cervical spine (ap and lateral views)