I found this in an article, and then looked it up on the internet. From what I see, it appears to be playing pranks on people.
It actually has 2 meanings.
The first one mean fool somebody or make jokes on somebody. For example, when you want to sit down, and I pull the chair away which makes you sit on the ground directly. This action can called 整人.
Another meaning is more serious. If a person A does not like another person B, A will do a lot of bad things on B in order to embarrassed B. For example, it can happen in a company. If A does not like B, A will treat bad on B and force B leave the team or the company. It is also called 整人.