How you respond depends on if your child is 4 or 14.
Bullies are generally insecure about something, or are being bullied themselves and do it to others to feel in some control or have power. Always tell them it is never ok to say those things to someone. Then try and delve into what is really bothering your child. Is it something at home, school, and inquire with the child how you can help.