Ultrasonic waves were a form of sound with a frequency beyond the upper limit of a Human's perception. They were used therapeutically for rehabilitation purposes in mental institutions in the 23rd century.
In 2269, former Fleet Captain Garth of Izar made modifications to a rehabilitation chair at the asylum at Elba II, turning it into a torture device capable of inflicting great pain. He used the chair on both Governor Cory and Captain Kirk in an effort to gain information that would facilitate his plans to take over the USS Enterprise. His plan ultimately failed and the chair was returned to normal. (TOS: "Whom Gods Destroy")
In 2371, when the Female Changeling was pretending to be Kira Nerys and trapped in rubble, she talked of a theft on Remmil VI where a band of Nausicaan raiders broke into the central museum by using an ultrasonic generator to create a sympathetic vibration in the webbing and shatter it. (DS9: "Heart of Stone")