Infrared sensors operate by detecting the heat emitted by objects. In the context of cancer, these sensors can measure the temperature variations on the surface of the skin, which may indicate the presence of underlying tumors or abnormal tissue growth. Tumors typically have a higher metabolic rate compared to normal tissues, resulting in elevated temperatures.