Hitting refers to striking somebody, either with the hand or with an object, as a form of violence. The term "hitting" is usually used when a child hits another child, and is generally considered an offense regardless of what the other child may have done to anger the hitting child. "Hitting back" is the point where the offense becomes fighting.
Some people don't call corporal punishment by an authority figure (for example a slap on the hand, or a spanking) "hitting", because they don't want to equate the practice of corporal punishment with less socially acceptable forms of hurting others.
Other people, though, see a difference between corporal punishment and hitting, and don't see the contradiction when a parent gives a child a swat on the rear to remember him that there is "no hitting" in this house, despite it being hitting by definition, and scientific research shows that corporal punishment makes a person more likely to use violence on others. Even if a parent's infliction of pain is as ad-hoc, uncontrolled and short-tempered as a child's, it will still not be considered hitting by some people. This is an example of the theory of monopoly of violence where authority reserves to themselves the right to use force, and only then in a measured response, in concepts from "resisting arrest" up to the ultimate use being war.