When you walk on the platform in one direction, the platform rotates in the opposite one. It’s the result of the principle of conservation of angular momentum, which depends on mass, size and rotational speed of the system – and is equal 0 unless an external force is applied to the system. To stay on the spinning platform, you need to lean towards its middle. That position balances all the forces that act on your body, including the centrifugal force that is trying to “throw you off” the platform.