WARNING: wall of text ahead.
What you need to know: a (very basic) understanding of the rules would be a good starting point, even if you don't quite understand yet how the game will actually play out at the table.
You'll be incorporating a character within a story, and that character can pretty much do whatever you feel like, or whatever you think is fitting for that character. However, if you try to do something whose outcome isn't a given (such as sneak by a guard, decapitate an Orc, climb a cliff, break down a door), the rules provide a system of arbitrating whether you can successfully take that action. Therefore, it'd be good to have a certain grasp of what your character is at all capable of, what activities he/she will have a good chance of undertaking, and what kind of stuff might get you killed.
Other than that, try to come up with a halfway interesting character, but don't overdo it (an orphan halfling raised by demon-blooded Fey creatures, who stepped through a portal to Elysium in his teens, spent some years there before being thrown out of heaven and dumped in the slums of a dwarven metropolis, only to rise by guile and stealth in the ranks of a thieves' guild, being arrested due to being ratted out by his former true love, sentenced to death by the dwarf king, but taken by Drow slavers before the execution, being taught the ways of magic by an outcast kindly Drow Sorcerer, who was a hermit Human in disguise in reality, but died by accident of a magical experiment you were performing, which left you disfigured and blind but with four arms and wings, which when you were found made you a circus attraction, leading to your eventual return to the surface, where you perform as a hapless, blind clown for the masses... might be a bit too much).
Try to find a straight, easy-to-imagine-but-still-not-too-shallow concept that interests you (maybe a former enforcer for the mobs who is trying to reform after losing his brother in a fight; or a young, overzealous, preachy, but ultimately unsure Cleric; or a Sorcerer who constantly hears otherworldly whispers which teach him magic; or a knight who got kicked out of his liege's service for drunkenness and wants to redeem himself; or whatever). Simple concepts are good for a start - they let you interact with a modicum of certainty of what to do. Trust me, your character will grow over time to become much more complex and 'deep'.
When you have this character concept ready in your mind, and only then, think about race, class, feats, skills etc. Imagine your role in the group, imagine different situations you might find yourself in at some point, and work out a few 'standard responses'. That way, a newcomer isn't totally overwhelmed by the spontaneity that is sometimes required in roleplaying. What will I do when a friend is in very great trouble? What if it's a stranger? How will I act in the presence of beautiful/powerful/disgusting/aggressive/untrustworthy etc. people? Is there something I really, really cannot abide - and is there something I really, really want out of life? Am I playing a thrill-seeker, or a cautious methodical fellow? Do I prefer the direct approach or the indirect? Will I usually boastful, sensible, quiet, patronizing, enthusiastic, selfconscious, zealous, sneaky etc.? How do I react to blood and death, to humiliation, to unforeseen trouble? Those are the questions you should be asking yourself before the game, and at any given point in the game (when they become relevant).
What to expect: now this depends largely on who you're playing with, as others have stated, but one thing is certain: roleplaying is an awesome mixture of a social game, a tactical game, and theatrical elements, with lots and lots of freedom for everybody involved to participate in, influence, even steer the course the game is taking. If you're in the least capable of coming up with things on the fly, if you have the slightest understanding of social interactions, if you are able to see things from a perspective different from yours for a bit - you'll have a fantastic time. Pun intended.
On the social thing: My current D&D group consists of a criminal judge (female), a hospital nurse (female), a computer programmer (male), and a medieval historian (me, male). About as varied as it gets in four-people groups. I'd say that, outside of our D&D nerddom, we're pretty normal people with a pretty normal outlook on life. The judge and programmer are married (to each other) with a child, I'm a dad too... just regular guys and girls playing a game.
Never hurt nor helped my chances with the ladies, as far as I can tell. The married couple I was talking about though? Originally met in our gaming group.