Its mostly reaction times, having a feel for the weapon that you develop in time, patience (MOST IMPORTANT. Let the opponent do the aiming for you, just keep your aim steady and let them move themselves into the bullet. Don't remain still of course, strafe around, but don't try to make rapid movements in the hopes of hitting the head because most of the time you'll just start choking.) and a bit of luck.
Keep your aim around headheight and move it horizontally, don't try to move vertically unless you absolutely have to. Then, while strafing just keep your eyes on the target and don't panic; Wait for it to line up and, if you have good enough reaction times and have predicted when its going to line up properly, bang headshot, guy goes down. Let the movement do the aiming for the most part, its easier.
As I said, the most important thing is not to panic. This is pretty much the universal rule in Halo, if you panic you'll choke more. Just remain calm but try to have a backup plan in mind for where you can get away to if you miss the shot. If your positioning is right, you'll usually know where it is without thinking too much, letting you focus on the target. And don't over think it either. Just be confident that you can get this headshot; If you overthink it, you'll doubt you can make the shot and when you doubt yourself you're more likely to panic. Panic can cause you to jump your aim around desperately. This is going to make it a lot less likely that you're going to get the skill..
If you are at really, really close range, just charge him and shoot and melee in rapid succession while looking at him. It's an easy kill; Snipe will knock out his shields, melee will knock out his health. Remember that you don't need the headshot; If you can only afford to get the body shot, maybe because you are going to have to be quick because you're already weak, then just take that, switch to your secondary and cap them with that. Like all things in Halo, practice is key; Maybe try customs with friends using snipers for a bit to get a feel for it if you're really struggling. The hardest step is getting to the point where you are able to do it fairly reliably; Once you can do it pretty regularly, you'll develop the confidence you need to stay disciplined. Its kind of a catch 22; You need to pull off the snapshots to have the confidence, you need the confidence to pull off the snapshots. That's what makes it so difficult for people just picking it up. Slowly but surely, you'll build up what you need to do it.