M.,
Honestly, I think our society goes about this subject all the wrong way. We tell kids someone is going to take them away by a stranger (which only happens to about 100 kids per year. The other 800,00 are abducted by a friend or family member or run away.) And after we drill "don't talk to strangers" in them, we expect them to be friendly to the substitute day care provider, take a sample from the bakery lady, a candy from the banker, cooperate for the new nurse they have never met. It's a mixed, confusing message.
I saw a Dr. Phil episode about this several years ago. All the kids interviewed knew all the right answers in the classroom when asked about "strangers." Then they took these kids to the park to play. They had one of the show producers the kids had never met show up to the park in a car. He walked up to the kids, told them he had puppies in his car, and the kids ran up and jumped right into the empty car without a thought. We think these kids know what to do because they regurgitate the answer we want to hear but they don't. They can't apply it to real life at such a young age.
When they are little, you just have to watch them closely. I tell my kids, if you want to pet someone's dog at the park, you have to get me to come, too. If someone you don't know offers you a treat, you have to ask me. If someone you don't know talks to you, you can talk to them if I am right there. It's rules they can understand and none of my children have had trouble following them.
When they get to be school aged and they are more independent, then I talk a little more about strangers, but not constantly. (Again, think about the odds of stranger abduction versus the odds of emotionally / mentally traumatizing your child.) The schools are VERY careful not to release your child to anyone unless they are on your child's "release to" list. But you may drop your child off other places, so it's good to talk about who will pick them up, when, and what to do if someone else tries to pick them up, give them some story about how they are helping you, offer you a ride, etc.
I always tell my children what to do if they get separated from me in public. If we are at Target or another store, I have trained them to identify a female employee and ask for help. They know to give their name, my name and our phone number. If it's not in a store, they are to seek help from a mom with young kids.
Good luck,
S.