Ultrasonic transducers function based on the piezoelectric effect, where materials like quartz or certain ceramics generate mechanical vibrations when subjected to an electric field. The transducer emits these vibrations as ultrasonic waves, which can then interact with nanomaterials for various purposes such as imaging or fabrication.