The A/C compressor pulley is driven by the engine serpentine belt. It houses an internal bearing that lets it spin freely when the air conditioning is turned off. When you turn on the A/C, the electromagnetic clutch plate locks onto this pulley, spinning the compressor shaft to pump refrigerant.
The internal bearing in the pulley eventually runs dry and wears out. When this happens, it will produce a constant whirring or rattling sound in the engine bay that disappears when the A/C clutch engages. If the bearing seizes completely, it can melt the serpentine belt and leave you stranded.