Transesophageal echocardiography (TEE) is an ultrasound-based test that provides detailed images of the heart by using a specialized probe inserted through the esophagus. The procedure involves patient preparation, sedation, and careful positioning of the probe to capture heart images, with advantages including its safety and ability to monitor heart conditions over time. However, TEE has contraindications and potential complications, making careful patient selection crucial.