D.B.
At this age, I don't think they really have a lot of empathy for others, so being mean back to her so she can see how it feels will probably not work, and it may backfire if she thinks it's okay for Mommy to be mean.
I think the wronged or hurt child should get all of the attention, and your daughter should get no attention when she does these things. She's trying to get a reaction from you, and it's working. Obviously you have to intervene, but it should be a consistent application of discipline and the loss of privileges. It needs to be immediate and unquestioned. It won't work the first few times but keep doing it. Separate her from the group, don't bother explaining why it's mean or hurtful because she either doesn't get it or doesn't care. Your goal is to stop the behavior, whether or not she understands the "why". Take away a privilege (immediately - nothing like "no tv tonight because you were mean this morning."), or a toy, or put her in her room. If it happens in a public place like a restaurant or playground, leave immediately, even if it inconveniences the others.
If a child misbehaves on the school bus, what do you do? I imagine you remove the child from the situation and make him/her sit in the seat closest to you so they can't be with the other kids, right? In your daughter's case, you don't want to give her your attention, but you do want to remove her from the scene. Be firm, be quick, be decisive. "No, we do not treat people that way." "No, those words are mean and they are not allowed. Give me the toy and go to your room." (Then remove any fun toys from her room - I used to let my child keep his stuffed animals and his blankie, but no toys). Anyway, consistency is the key, and it WILL work.
Find out if she does this at school too - if so, it may be a bigger problem and perhaps she needs a therapist, as someone else suggested. You can also ask the teacher what she/he says so you can use the same language at home. But if it's only with you, then you have part of your answer already.
Good luck - we all go thru this!