A centrifuge works by spinning objects around a centre axis. This spinning pushes harder on dense material than on less dense material which separates objects by their densities. This is related to the forces that are felt on carnival rides as people are spun around.
Centrifuges are used to separate mixtures of gasses, or solids within a liquid. With liquids, a centrifuge is used to increase sedimentation. A gaseous centrifuge can be used to separate isotopes, for further explanation please see Gas centrifuge.