The Drean World was basically an online minigame of sorts that could be accessed via the internet browser. By making an account on the official Pokemon website, you could get a code that would link your account with your Black, White, Black 2 and White 2 games. You could send a Pokemon to the Dream World and could find special items and Pokemon (with their hidden ability) and they could be sent to your game. A lot like the Pokewalker in Gen IV.
The Dream World ceased operations on January 14, 2014. Rip.
Hope I helped. :)
Source: Experience (Bulbapedia for date)