How you think of a movement greatly influences your performance. Handstand or dancing, all comes to one thing - how you see it.
As much as the muscles and their strength, stamina and flexibility, are important it is the central nervous system (CNS) which governs their work and determines when, how much and for how long to engage them.
Inside the brain we store myriads scenarios of the different muscle engagements needed for that or another set of movements. How the CNS chooses them depends on how you see the movement.
For example, you see a person performing the press to handstand. Typically, the first thing you notice is his or her legs going sideways and up into the handstand. With this vision in mind you attempt to do just that. You assume the position, the CNS activates all the muscles associated to the leg activity (abductors, hamstrings, hip stabilizers, etc.) and nothing works. Why?
There are a couple of dilemmas here. First, at that moment, the legs are carrying your bodyweight while you are trying to move them. Second, the leg muscles on their own cannot bring your legs up in the air. Before they can the other muscle activations must be in place. So you keep falling down like a rock after each jump you take.
If you keep doing it for a while, then after a year or two (and a couple of muscle sprains) the CNS might (or might not) show you some mercy and discretely figure out which muscles in what order to engage to give you your press to handstand. There is a shortcut - a different vison.
First, you need to pike the torso to bring it into as vertical position as possible while still on the feet (primary muscles - erector spinae, lats). Second, while holding the torso vertical you slightly lean forward onto the hands (primary muscles - deltoids, trapezius). Third, pressing the shoulders out (upper trapezius, levator scapulae) you anteriorly rotate the pelvis (lower back extensors, hip extensors) AT THE SAME TIME brining the legs sideways keeping them close to the torso.
If you manage to hold the first and the second components in place while performing the third one - you got the press to handstand.