What can cause pain and swellin of back, neck?

Neck pain/swelling. Can result from trauma/injury such as whiplash, from working with head/neck bent forward, infection, neoplasm. Direct trauma may cause contusions, hematomas, edema, muscle spasm. Persistent problems should be evaluated by doc. Moist heat, stretching exercises, nsaids, massage, physical therapy can lessen pain & spasm. See doc if not improving.