A relay and a contactor are both electrically operated switches, but they differ in their design and application. A relay has multiple sets of contacts, allowing it to control multiple circuits simultaneously. A contactor, on the other hand, has a single set of contacts and is typically used to control high-power devices such as motors and compressors. Relays are often used in low-power applications, such as controlling fan motors, while contactors are used in high-power applications, such as compressor control.