If your gym doesn't have a neck machine, you can do bridges. They're a basic football and wrestling excercise for neck strength.
Start on your knees, head on the floor, hands on the floor for balance.. Stretch your neck by touching each ear to the floor, or get as close as you can.
After you stretch a while, get up on your toes and do the same thing, still using your hands for balance. This will take some time to get used to, but it's GREAT for your neck.
As you get better at it, do the same thing, but inverted. Start on your back, lift your torso up so your body is supported by your feet, hands, and head, forming a "bridge". Rotate your head while using your arms for balance. As your neck gets stronger, you'll use your arms less and less for support.
Be careful with these. No jerking motions, go very easy at first. Get your neck used to it. Go from there.