Another way to say "Compasses operate by magnetism" is "A compass uses magnets to work."