It's a good idea to keep an instant, and/or hot & cold gel pack on hand to tend to an injury.
Neck and shoulder pain is usually work-related, but many people suffer from the repetitive strain that is associated with pain over a progression of years including:
poor posture
duration of employment in which repetitive work causes the neck to be bent or twisted (awkward position)
sleeping without good neck support
sitting for long periods with head or neck bent forward