Okay, your question says Black and White but the tag says Black 2/White 2. No matter, it's the same either way.
Step 1: Beat the Elite Four in your BW/BW2 game.
This is necessary to gain access to Route 15, where the Pokémon Transfer Lab is.
Step 2: Go to the Pokémon Transfer Lab on Route 15.
This is how you will be transferring your Pokémon. Talk to the people at the very back of the building.
Step 3: Insert SoulSilver into your other DS.
Obviously you will be needing this to transfer Pokémon.
Step 4: On the SS DS homescreen, select Download Play and choose W2.
This is assuming you've already started the process in your other game. I assume this is the step that's causing you problems. It means you have to select that ID No. from the DS that has SoulSilver in it.
Step 5: Wait for it to download, then pick 6 Pokémon to transfer.
After choosing those six, you will have to catch him in a fun little minigame*. Continue to repeat this process until you have transferred all Pokémon.
I hope this helps! Here's my source and I've also done this myself.
**It's tedious and boring as heck to transfer a lot of Pokémon over six at a time, but if you're just transferring a few it shouldn't take long.*