You don't mean just building a cage and waiting for something to walk inside of it, right? Because that doesn't work in real life, and it won't work in the game.
If you want to capture a creature, you need two things: a mechanics workshop and a carpenters workshop. You can build the necessary cages in a carpenters workshop, but to build the trap you need mechanisms, which can be built in the mechanics workshop.
Once you have the necessary mechanisms, you can build a cage trap with b-T-c. By pressing those keys, the game will let you select the location of the trap. And once you click enter, you choose the mechanisms you want to use.
There are a few more things to remember. Loading a cage trap takes time, a dwarf has to bring an empty cage to the trap. The trap is not loaded when it is first built, only after one of your mechanics loads it. Cage traps also can be viewed as a more effective means of defense because unlike other traps, cage traps always capture the creature if it can't avoid traps, while weapon traps only sometimes get the kill. This makes cage traps an effective weapon against invading goblins and monsters alike, but a trap that is slow to set up, and gives you another problem: what to do with all of these captured goblins?
But what you're talking about is simply building cages to capture and tame creatures, not to protect your kingdom from hundreds of invaders. So just place them anywhere that the elephants can get to them, and you will capture something eventually.