To get good at handstands, you pretty much will need to just do a lot of handstands. Use a wall until you're strong enough to do it freestanding. Also exercises like planting your feet on a wall, then walking your hands back to the wall the back out again can help strengthen the muscles used in a handstand.