Putting on strings just takes practice.
Knowing how much "slack" you need on the string before you start winding takes practice.
The thinner the string the less "slack" you should have. Also always string up the guitar with the thick strings first because they will hold the tension if you have a tremolo bar. Stringing up the thin strings first will usually result in a snapped wire to the face.
One trick I like to do is to first string the wire through, then do one wind above the wire that's sticking out of the hole, then wind the rest below the wire that sticks out. That way, the part that sticks through the hole is held in place by the wind and doesn't "slip". Remember, you want to wind the string DOWN the nut so the string heads back up to the truss rod bridge, creating tension.
Remember, don't cut the strings until you have them on and wound up all the way. Once they're cut, you're stuck with that length to deal with.
Before I start tuning the strings, I usually grab all six strings with my hand and tug it away from the fretboard to loosen them as much as possible. Then I tune. Then I grab each string and tug at them around the twelfth fret (midway point of string) and bend the notes at the twelfth fret as well. If you have a tremolo bar, do some dive bombs and pull the bar back to stretch the strings. Tune the guitar and repeat again until you can abuse the strings without it going out of tune.
Also, if you're using a tuner, it's a good idea to tune just a tad Sharp because guitar strings usually become Flat as they go out of tune (tension starts to wane).
Also, you should always check to see that your truss rod is not warped (if you have an old guitar) because you can tune and tune and never get it into tune if your neck is even slightly bent. The best way to check if your truss rod is intact is to play a note on the twelfth fret, then hit the harmonic of the twelfth fret. If it's the exact same note then the truss rod is fine. If the harmonic note is slightly flat or sharp, then your truss needs adjusting. Always have a truss rod adjustment done by a guitar store or professional. You can snap your neck in two if you don't know what you're doing.
You might want to get one of those plastic winding things too, it makes a huge difference.
Eddie Van Halen boils his strings in hot water before he slaps them on. I guess it "pre-stretches" the strings and also gets rid of any grime or grease from the factory. He claims it makes strings last longer. I just change my strings whenever the guitar starts losing its "brightness". Of course, you need to break the strings in a bit before you get the optimal sound and feel. So if you're going to play a show or do a gig, it's always a good idea to put on fresh strings and play them in a bit, because strings usually break when you first put 'em on (bummer) or when it's about to go bad.
Good luck!