Entering the world of pretending to be a mysterious elven mage:
You get the idea.
These are role-playing games: you get people together, and you have fun writing your story. One of these people needs to be the Dungeon Master or Game Master, the person who runs the sessions. In order to do this, you need to understand how your setting works, both the physical place where the characters will be playing, and the ruleset you'll be using. And there are lots of these available, some for free on the Internet and some for purchase online and/or in actual, constructed stores. The GM or DM also needs to come up with a plot for the players to follow, either purchased, obtained somewhere or written on your own. Again, you can find lots of these for free (although ripping off a book or movie your players are familiar with is not likely to go well).
Wait, hold on. First of all, how do I find people to play with?
Well, there's this forum, for starters. There should also be groups at your local gaming store(s), should you have any, and you probably will if you look. Some organize entirely online, and you could even ask your friends if they want to try.
Okay, I've got a group, now what do I do?
Now you pick what you want to play. And there are a lot of options, yes. You can play stuff set in the medieval fantasy of D&D, or you can play the grim dark of future war, or various other options. There isn't any right or wrong, it's all up to what you and the other players are in the mood for. Maybe you want to kill lots of monsters with warhammers and fireballs, or maybe you want to become a vampire (if you are a Twilight fan, sorry, you cannot actually do this in real life), or maybe you want to slip through an intricate web of lies and intrigue yadda yadda yadda. You get the point.
Okay, got that done, now what?
Well, you generate your characters. Each person who wants to play needs pretty much two things: a character concept, and a character sheet. The character concept is who you're pretending to be, which obviously has to be tailored to the setting – you can't be a wizard in a game without magic, for example. Apart from that, it's all up to you, similar to choosing the setting in the first place. In many systems, the concept will be restrained by what the system will let you do; for another example, Dungeons and Dragons has a class system, and you have to be one (or more, but initially one) of those classes. (Okay, there's also homebrew and such, but let's not get into that.) Then you use that concept and fill out the sheet that that system uses. You might have to pick stats, saves, powers, feats, skills, aspects, etc. This part really depends on what ruleset you're using, so you'll have to read the relevant book(s).
So how do we start playing?
You, and everyone else, will have to decide what method you'll use for that. If you all know each other in real life, you might spend a few hours every Saturday night at someone's house, or an available room in a public building, or the abovementioned local game store. If not, then the major options are text chat, where you'll be playing in real time, voice chat, same deal, or Play by Post, where you'll post what your character does and the DM will say what happens in your imaginary world after that. There's no right way, it's just a matter of what you want to do and what suits everyone's schedules and preferences best.
Ack! I'm the DM! What do I dooo?!
First of all, calm down. Breathe. You good? All right, let's start. As mentioned above, you have to devise a plot, and if you have no players yet, you might advertise for some with teasers about that plot and details about the setting and rules (i.e. “D&D second edition, low magic, no halflings because they're dumb and I hate them”). If this is your first time running a campaign, you may want to buy or find a premade module, and most (if not all) rulebooks come with one or two precisely for that reason. Either way, it'll be your job to figure out how the world reacts to the players' actions: what the other characters, the ones not controlled by the players, say and do, how their plans change or stay the same in consequence, and so on. Keep in mind that there's no one right way to do this, and as long as everyone's happy and having fun, you're cool. If people are having problems, it largely falls on you to find out why and resolve the situation, and I'm sure that mature, responsible adults can accomplish that.
I want to play, but I'm broke. Is there any way to do this without shelling out cash?
Actually, yes. Some books are free, like Basic GURPS (Generic Universal Role-playing System) [though that's quite limited, and you may run into some issues running a campaign] and D20 Modern, which is what I'll be using on the campaign I'll be GMing soon. There are also plenty of adventures available for free online. Take a look!
I don't see anything in these books about winning. How do I win Dungeons and Dragons?
It's not about beating a game, like in Halo, Half Life 2, or Dragon Age. It's about a shared story and experience. Or just about smashing the shit out of goblins, if you prefer. Either way, you don't really win. You just play. You pretend to be someone else, engaging in heroism, villainy, or trying to stay alive and make your way in the world. And if that doesn't sound like fun to you, that's okay, this might not be the hobby for you.