These dyes work by conjugating a fluorescent or radioactive dye to a folate molecule. The folate serves as a 'homing device' that binds to the folate receptors on cancer cells. Once bound, the dye allows for visualization through imaging techniques like fluorescence imaging, PET scans, or SPECT scans, thereby highlighting cancerous tissues with high specificity and sensitivity.