Is it ever okay to hit your child?

Is it ever okay to hit your child? If so, what are the reasons that parents do this? If not, what can support a parent in choosing not to use physical punishment on their child?