We taught our daughter respect from age 1 and up, obviously it is simple words at first but as they get older you can give more reason why you respect others. My daughter is now 4 and usually is very respectful/polite but we have started to teach her at a young age AND we live our lives in respect so she is surrounded by it all the time.
At first it is thank you, please... we started as soon as she was talking. It took awhile to learn the words but by 1 1/2 or 2 years so had that down.
Around 1 1/2 & 2 we started to how to address people politely, how to treat them politely, continued to remind how to ask nicely for something and say thank you.
At age 2 1/2 & 3 we did more teaching on in-depth of why we act the way we do, we go to church weekly and for us having that religious background does help on why we do, say, act the way we do. We also started her to ask nicely to be excused from the table after a meal "may I please be excused?" to show that you are polite even when leaving a place/situation.
Now at 4 years she is usually very polite (she says thank you to the mail man almost daily when he drops of the mail, she started this on her own we never said to do it), still working on different situations dealing with how you talk politely to other kids if they other kid is not being polite. We have found that she is more polite when at others or in public places, at home is not always polite but that is getting better (if she wants a glass of juice and says "I want juice" we just stare at her until she realizes why she is not getting it and then she says "May I please have some juice."