Samadhi is the final limb of the eight-limbed path of Yoga (Ashtanga). The other seven limbs include ethical guidelines, prana control, asana mastery, concentration, etc. Although most yoga literature lists the eight limbs of yoga in the same order, the yogin does not have to follow that order. You do not have to master one limb and then move to the next one. Everyone has a unique way of tackling them. But the last one, Samadhi, definitely requires mastery of the other seven limbs.
I hope, now, it is common knowledge that yoga’s goal is not doing a handstand or any other Asana. Asana is just the seat for meditation. Meditation is the ultimate yogic practice. Yoga is all about consciousness.
Yoga gives us tools to alter our mental state to break our limitations to the point that we are limitless.