In the Sahihain [ only Imam Bukhari narrated it in his Sahih] it is narrated that the Messenger of Allah (sallallaahua alaihi wasallam) “ If a housefly falls In the drink of anyone of you, he should dip it ( in the drink), for one of its wings has a disease and the other has the cure for the disease.”
The Hadith contains two areas of interest, Fiqh (Islamic jurisprudence) and medicinal. As for the Fiqh part, the Hadith states that the when a fly falls in water or fluids, it does not make it impure, according to the majority of scholars. None among the early generations contradicted this ruling.
As for the medicinal value contains in the Hadith, Abu Ubaidah said that the purpose behind dipping the fly [in the drink] is to extract the cure from [its other wing] just as the poison was extracted from [the wind that fell in the food].