Hitting refers to striking somebody, either with the hand or with an object, as a form of violence and without having legitimate authority. The term "hitting" is usually used when a child hits another child, and is 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 also call corporal punishment by an authority figure (for example a slap on the hand, or a spanking) "hitting", usually to express their view that it is equally unacceptable as the childish offense of the same name.
Most people, though, see a difference between controlled, legitimate corporal punishment and hitting, and don't think it is contradictory when a parents gives a child a swat on the rear to remember him that there is "no hitting" in this house. This is related to the theory of monopoly of violence with 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.