Is it something like stiff neck? If that's the case, apply ice pack (and some Ibuprofen, even if it's not due to muscle stiffness, NSAIDs such as ibuprofen works for the pain; and yeah, it's usually available over the counter). And yeah, have it checked by the doctor.
I've gotten it checked out before, and it is apparently due to narrow spaces between cervical disks. It's compressing the nerve, hence the pain in the neck/shoulder/arm.
Ibuprofen might be able to relieve pain, but it's definitely not a substitute for other treatments as it only provides temporary relief.
I wish you the best with that.
Thanks.