Mosquitos and midges lay their eggs in water and their young live and grow to their adult stage there. They do not have gills, so have to come to the surface to breathe. However, unlike humans, mosquitos are small and cannot easily break the surface tension of water and so once underwater they would have to expend a lot of energy to reach the air. To overcome this, their breathing spiracles are filled with hydrophobic hairs. This prevents them from ever getting wet and to easily break through the pond surface with just this part of their body.
One way of killing mosquito larvae is to cover the surface of the pond with oil. This oil coats the hairy superhydrophobic surface of the larvae, causing them to suffocate. The same method can also be used to kill headlice. Treatments purchased from a pharmacy involve wetting the headlice with a thin layer of oil that fills their breathing apparatus.
Read more about mosquitos here.