A centrifuge works on the principle of centrifugal force. When samples are spun at high speeds, the centrifugal force causes denser particles to move outward to the bottom of the tube, leaving less dense substances at the top. This separation is essential for preparing samples for further analysis like microscopy or biochemical assays.