Many years ago I played Dungeons and Dragons for a short while.  I didn't have a good DM and I didn't play very often so eventually I just stopped.  Sometime in the past year one of my friends asked me if I wanted to play with a group he was in.  I said "sure".  Now, fifteen or more years after starting to play D&D, I'm playing with a bunch of good players and good DMs.

What you need to play

You actually don't need anything to play, but most people have their own dice and a copy of the Player's Handbook, at a minimum.  There are other books dealing with the various races and classes of player characters in D&D.  If that's not enough, there are books about the weapons and the combat system and, of course, magic.  There are also all sorts of novels set in the D&D realms.  I haven't read any of them, personally, but I'm told they're quite good.

If you click on one of these titles, you'll be taken to the Chapters.ca website where you can purchase them online.
 

Player's Handbook
If you don't want to spend a lot of money on D&D books, this is the book you should buy.  It has everything you need to know about creating a character, taking part in combat, using magic and so on.
PHB 3e
Player's Option:
Combat and Tactics

Player's Option:
Spells and Magic
Player's Option:
Skills and Powers
There are several Player's Option books dealing with various aspects of the game that some DMs use.  They enhance the basic game and provide more depth and detail to the adventures. 
The Complete Book of Elves There are several books concerned with the various player character races.  Personally, I tend to play elves because they have some neat characteristics.  Other people prefer to play dwarves or even humans.

Priest's Spell Compendium
Volume 1 (A-F)
Volume 2 (G-?)
Volume 3

Tome of Magic

The Dice

Both the players and the DM use dice to determine the outcome of almost everything.  Plain oldsix-sided dice (d6) are used for some things.  There are also four-sided dice (d4), eight-sided dice (d8), ten-sided dice (d10) and twenty-sided dice (d20).  I've also seen thirty-, forty- and one hundred sided dice in the stores.  There are also percentile dice (d100) which consist of a d10 numberd 0-9 and another d10 numbered 00-90 in steps of 10.  These are used to determine percentages.

Being a Dungeon Master

The Duneon Master (DM) is both the referee and the storyteller.  He (or she) establishes the environment the campaign takes place in and runs the encounters.  He also controls the actions of non-player characters (NPCs) and monsters.  The players, however, control their own actions.  If Bob's character Zorn decides he's had it with his fellow party member Gions, he can choose to attack Gions.  The DM will have Zorn and Gions roll their dice and do battle.  This behaviour, however, is generally frowned upon by most players and DMs because you're not supposed to be fighting among the party members.  That's not the point of the game.

DMs can buy a module or they can create their own.  There are advantages and disadvantages to both.  Buying a module means the DM doesn't have to create a complete world from scratch -- a process that can take months or years.  And the module probably fits into one of the realms that exist for D&D.  Creating a module on the other hand means the DM can tailor it exactly the way they want.  They could set it in an existing realm or create their own.  This is, needless to say, a lot of work.