It will probably take 5-10 years before you're ready to move into the caverns, but until you're ready to move into the caverns you need a place for all of your dwarves.
5-10 years? I had the first cavern of a 4x3 embark walled off on the first level by the end of the first year, and walled up to the ceilings by the end of the second. It helped that the caverns tended to spawn pond grabbers, which is less good now that I'm trying to figure out if I've killed all the spawn points for land-based wildlife. FBs have no problem dropping in through the patch of deconstructed wall, but I've never seen anything else walk into the traps there.
Depending on what's down in the caverns when you first start out, you might be able to move in straight away. Wall off a small section of cavern with water access, and then create an entryway as you would above ground. Troglodytes, naked mole dogs, and cave crocodiles are pains in the butt so build a wall of cage traps (mostly to catch the cave crocs), but giant olms and pond grabbers will generally chill in the water until you send your cavern scout too close.
It's pretty nice having access to all that wood and water. Once I get a better trap entrance set up I can let wagons leave through that and only have the surface open for three weeks in the year.
When you first embark you need to defend your supplies against any invaders, so you need to secure the perimeter, find a source of water and a farm, set up some beds and storage. Just build a very simple small fort, but it needs to provide for defense, food, booze, and sleeping areas.
Then from there you need to outfit a military. The miners need to dig down and find metals, and the metals must be smelted and forged into equipment. Alternatively you can buy the equipment from traders, but it will probably take a few caravans to get everything you need. In order to buy the stuff you need to produce trade goods, but either way this takes some time.
After you have some gear for your soldier, train 'em up. Even using a danger room it will take some time to build the danger room.
While the soldiers are getting ready you need a large number of blocks for walling off the caverns. The masons can work on these while the soldiers are getting ready.
Zone the cavern as a burrow and order your soldiers to defend the burrow. Then start walling off the caverns. All the way to the ceiling. You'll need to build stairs to do this as well, so it could take a while. Depending on how hostile the wildlife in the caverns are this could be very dangerous as well.