See below. Puberty is probably a good time to introduce the concept. Hiding the truth from children is never a very good idea, but finding ways to bring the topic up is not easy.
10 Years old or so. You should talk with your kids any time they ask or show interest. In addition, you should be talking to them before you think they 'need the talk'. Once at that point, you are likely to late. You should include a talk about sex and STDs when your child is approaching puberty. Your doctor can help, but you are the main source of info for your child.