The characters you and the other players control are called PCs, for Player Character. All the other characters in the game will be controlled by the Dungeon Master, and are called Non-player Characters (NPCs). Your characters will be encountering many NPCs throughout the course of the game, from the undead zombies with no personalities, to the simple shopkeepers who don't know much about the outside world, to the complex individuals who are key to the plot of the story. There's little point in talking to the zombies (unless you're swapping brain recipies) but you will frequently wind up in conversations with the others. You'll want to remember to talk to them "in character" based on the personality you defined for your character in order to get the most out of your D&D experience (and so that you don't get penalized XP from the DM). Other than that, here are a few tips that will help you avoid falling into common problems when talking to NPCs:
Don't expect them to know everything. Don't waste time.
A common peasant most likely isn't going to know much about an evil goblin prince in a far off land. Even if you are investigating an occurance in a peasant's local area, they may only know rumors or small misleading pieces of information. They are mostly focused on living their own lives and are not placed in the game to help you. When talking to any NPC, try to be sensitive as to whether or not you are barking up the wrong tree, and don't waste your time. A character may be very friendly, inviting you into their home for dinner and spending half the night sharing the local gossip with you, but it's not going to get you anywhere.
They might not be telling the truth.
People lie. They may do it because they are up to no good, or maybe just because they don't like the cut of your jib. Characters with a high Wisdom can sometimes figure out if an NPC is lying, but otherwise you're going to have to use your own judgement. Feel free to go back and pay an NPC a second visit if their information led you to a snake pit instead of a treasure hoard.
Keep in mind the impression you are making on them.
In a land where most people are struggling to make their way in life, your characters, with their suits of armor and wizards robes and what-not, are going to stand out. This means people will remember you. If you go into a town and go around rudely interrogating everyone, you may find that the next time you visit that all the inns are closed, or worse.
Also remember that your characters are probably fairly intimidating to the average person - for one thing, you are heavily armed. People may say what they think you want to hear instead of what they actually know if you don't put some effort into setting their minds at ease.
You don't have to do what they tell you.
If you are on your way somewhere important, you don't have to stop and hunt down a band of local brigands just because a mayor has asked you to. You get to decide what your character does, not any NPC.
Don't piss them off.
The wrong words can get you killed. When dealing with an arrogant king or mad wizard, repeatedly asking questions that the character clearly doesn't want to answer, or otherwise insulting them, is likely going to get you thrown into a dungeon or turned into a centipede. Even when you are sure of your safety, you don't want to ruin your reputation with a few careless comments.
Overall, just use common sense. Pretend that you're talking to a real person and you should be fine. Be careless, and you could find yourself being run out of town by an angry mob with pitchforks.
you are aware of the average level of social graces we possess right? Telling this group to pretend they're talking to a real person is a recipe for disaster!
none of us has gotten beaten up yet.
you beat adam up all the time.
AHA! so you admit i'm a real person!