A good hiding

To be given a good hiding...

I am an English teacher and I tend to use a lot of idiomatic expressions...

I believe that this comes from 'hide', to skin an animal, therefore a good hiding refers to the apparent result of the beating...

Does anybody know the true meaning?

It's rather simpler than that. There is a (now rare if not obsolete) colloquial verb "to hide", meaning "To beat the hide or skin of; to flog, thrash". A "hiding" is simply a session of this activity.