My favorite stretch to loosen up neck muscles had been doing circles and rolling my head around in 360 degrees of motion a few times then switching direction. I've heard from people and on the news that this is unhealthy and dangerous. Why? What are alternatives that work the full range of motion. I do a lot of swimming and find my shoulders and neck get sore.
Rolling the neck is contraindicated because it can hyperextend and compress the cervical vertebrae and cause nerve damage over time.
You can let your chin just kind of hang your your chest, and lean your head to the side (Think touching your ear to your shoulder) as recommended neck stretches. As you advance, you can add a gentle traction to the side stretch. (So if you are leaning your head to the right, you can place the palm of your right hand on the high curve of the head and gently apply a pulling, not a downward, pressure. Be aware and stop at any discomfort).
You can also look to the right and left as if you were trying to look behind you without moving your shoulders. These should all provide a stretch to the muscles in the neck/jaw/upper shoulders (Of which the sternocleidomastoid will be the primary recipient).
The best way is to slowly, gently stretch and strengthen different muscles at the same time. For example:
push the chin down (that firms the front of the neck) and at the same time, pull the throat backwards (that lengthens the back of the neck)
push the throat forward, lift the chin up (lengthens the front, firms the back)
When turning the head sideways, it is good to slightly lift the ear (eg. if you are looking over the right shoulder, lift the right ear slightly). The reason is that the upper part of your spine is at a slight angle, that is, if you turn your neck when it is perfectly vertical, there will be a slight pinching in the neck (noticeable on the skin of the neck), which you should avoid.
Whenever you bend, try not to collapse on one side, instead, lengthen one side and maintain length on the other side.