Roleplaying, in the most general sense, is the act of taking on another role, and acting it out. The most prominent roleplayers out there are the Hollywood movie and television actors, but the term can apply to theatre, even musicians - they may be entirely different during a concert than they are within their personal lives. Fortunately for those of us who claim to be "roleplayers", none of these are generally associated with the term.
Roleplaying is a term usually applied to fantasy gamers, such as players of Shadowrun, Dungeons and Dragons, Alternity, MUDs... the list can go forever listing the number of different venues for this art - for an art it is, just like acting.
We'll assume for the moment that, in reading this node, you're interested in what a roleplayer does. Keep in mind that most roleplayers have their own view of what is "right" - take what I've given you here, and modify it as you will to make it work right for you. Also keep in mind that to actually roleplay, the best teacher is experience - and I can't give you that. For the purposes of this, we'll go with a D&D character - the concepts are the same for the other roleplaying systems, but the specifics, such as classes, races, etc. vary from system to system.
The first step is to pick an idea for your character. This generally requires a knowledge of the D&D mythos - having read "The Hobbit" once or twice will give you the basic ideas and stereotypes you can play to. Keep in mind - it's not a bad thing to play to a stereotype! The grumpy dwarven fighter with an axe seems to be all too rare these days in an "experienced" group of roleplayers. Everyone seems to want to play an 'out of the ordinary' character. While this is fine, you end up with a entirely different set of cliches/stereotypes: a good drow cleric of Corellion Lathereian, a dwarven thief that follows Grumuush, or a hobbit/halfling paladin. If you've played D&D, you'll realize how absurd these race/class combonations are. If you haven't, trust me - they're pretty absurd. For the purposes of this, we'll go with a human fighter. Not too hard to roleplay, and still has a wide range of possibilities to it.
At any rate, once you've chosen a race and class, you need to choose a general personality trait or two to go with it. Some common ones would be grumpy, cheerful, sullen... whatever strikes your fancy. You can choose to emulate someone you know, a movie actor, a character in a movie or television show (my favorite was Hannibal Smith from the A-Team), or you can come up with your character's own personality. We'll go with a grumpy human fighter with a overtone of "I don't give a fuck." to his attitude.
The next step is typically to choose a catch for your character. A signature, if you will. This could be a weapon, a spell, or even a personality quirk - or more than one of these. You want something that makes your character stand out from the rest. Keep in mind that if you're playing the aforementioned drow cleric of Corellion, and he wears bright tie-dye, you might not want to stand out -too- much - you can probably skip this step. Either way, though, let's go with weapons, since this is, in fact, a fighter. We'll have our grumpy, jaded, human fighter wield a dagger and a whip. This is atypical enough to stand out, but not -too- much. This is also where you would usually make a physical description for your character - at this point, you want to be able to visualize what your character looks like - this will aid you during actual gameplay.
Your fourth step is to pick a name. This can be anything from a collection of random characters generated by a home-brewed program (one of my favorites being Ceeanuraalacio Onoaexidelano), to a name generated off of one of many internet name creation sites. Perhaps a home-grown name, if you're so inclined - you don't always need a sneeze of vowels and consonants to have a good name. In many cases, the name can suggest how the character would be played, as opposed to the character dictating what the name could/should be. For example, the name "Kramer" makes you give funny looks - even if you've never seen the TV show he's on. Perhaps your character with that name could be a goofy and unwieldy guy. In this case, we'll go with the name "Sydney" - a male name that doesn't have any special suggestions with it.
Picking a personality for your character - the fifth step. This is where it gets fun - this is where you take the little bits and pieces from the previous steps, and bring them all together. Here's the trick - this step can be skipped. With a bit of a gift for improv, you can take the results of the first four steps, and run with it, creating a believable character as you go along. On the other hand, you may not have as much of a gift for improv, so you'll need a few guidelines for yourself. A good starting point would be how they react to meeting new people, getting into a fight, backing down from a fight, long days/nights on the road, hunger, thirst, getting injured... the list really goes on, but you need to pick a few set reactions so that you can have a base for your character. I personally skip the fifth step now that I've done it a bit, because it's a pain in the ass to write this stuff down.
The final step is to roleplay the character! You can do all the preparation in the world, and it won't do a damn thing for you if you don't actually test the character in an actual (fantasy) situation. Some roleplayers, skipping the aforementioned fifth step, just jump right into the game with the character they've made. This is perfectly acceptable, and to be honest, it's a better way to learn to roleplay overall. Others introduce their character gradually, making notes on their character's motivations, morals (or lack thereof), and reactions.
Of course, there's a way to short-circuit this whole process. You can get with a group of experienced roleplayers and play with them. Have them help you make your character and run with it. Experience, once again and as always, is the best teacher.