The free surface of water, behaves as stretched membrane due to surface tension. Due to the weight of the insect, the membrane is depressed. Now, the surface tension acts in an inclined manner. the vertical component of the surface tension balances the weight of the insect. Hence, insect is able to walk on the surface of water.