Is it okay to lock a child up in a room as a form of punishment (Discipline) or is it abuse?

This happened to me when I was a little boy and I did not tell anybody because I was afraid that I was about to be beaten up even more. Is it punishment or abuse? I am talking about locking a child up in a room and using him or her as a prisoner like your home is a jail.
4 answers 4