How do coaxial rotor work

How do they make 2 sets of rotor blades spin in opposite direction?