Your ball hitch rack may move because you have not adjusted it with enough clamping force. Check the nut or lever that connects the trailer to the ball to determine if it needs to be secured a little more. Sometimes bike racks have two restraint systems, one right on the ball and one further under it, to prevent the trailer from turning sideways when you're driving the car. In this way, you will have to check that both systems have the proper pressure. Another reason this happens is that you have put too much weight on the trailer, so check this and disassemble a bike if necessary.