The technique is called centrifugation.
This means that the centrifugal force is used to separate the water from the clothes. When wet clothes are in the spin tub, they experience a centrifugal force due to fast rotation. The water can escape from the small holes in the side of the tub as it is accelerated by the centrifugal force, while the clothes remain pressed against the sides.