I use my finger to hold one end of the socket just long enough to get the FARTHEST corner pin soldered. (Otherwise you can burn your finger.) Then I let it cool as I hold it. Then I use my finger to hold the soldered corner, to ensure it's all nice and flat, and solder the opposite corner. Then it stays put nice and neat for the rest of the pins.
Don't blow on solder to make it solidify faster. It should be heated an extra second or two after it has joined, so it flows into all the areas of the joint, and then allowed to cool naturally.
For header pins and other mostly-plastic parts, don't rely on the header's own plastic stuff to hold the pins straight and even. The plastic will melt quickly, and you'll just push the pins right out of its own plastic holder. Put a female header onto the whole row of pins, and/or use a hands-free clip or metal pliers to absorb excess heat from the metal. Give the plastic a few extra seconds to cool again before you put any push/pull stress on it, like removing the header's mate or pliers.