Exploratory surgery was a medical procedure performed by a surgeon with the intent of discovering a health problem. This was generally done only when non-surgical means were unable to determine the cause of a problem.
Upon first examining Geordi La Forge in 2364, Doctor Beverly Crusher suggested performing exploratory surgery on him to possibly desensitize his brain to the pain caused by the use of his VISOR. La Forge declined, as it would affect how the VISOR worked, just as painkilling drugs would. (TNG: "Encounter at Farpoint")
In 2371, Quark asked Doctor Julian Bashir to perform exploratory surgery on Grand Nagus Zek in order to determine the cause of his unusually generous behavior, which was later found to be caused by the Bajoran Prophets. He did so after Bashir's use of various medical equipment was unable to find anything wrong with him. Bashir refused to do so, believing it to be unneccesary. (DS9: "Prophet Motive")