Transferring requires two DS consoles—one with Diamond/Pearl/Platinum/HeartGold/SoulSilver inserted (the source DS), and one with Black/White/Black 2/White 2 inserted (the target DS). In the 5th generation games, after you get the National Dex, you can access a feature called the Poké Transporter, which is basically a mini game that downloads onto the source DS and lets you transfer the Pokémon, six at a time, across into the target games.
Pokémon Bank works with one 3DS, because the software in question isn't on a game card. Useful. Hopefully it doesn't jam an unnecessary mini game in-between transfers.
Get this: Pokémon Bank pretty much means Pokémon all the way from 10 years ago when Pokémon Ruby and Sapphire were out will be able to travel into X & Y! This is chilling.