It is the concept pf surface tension that helps the coin to float on the top of the water in the glass. The surface tension acts just opposite to the gravitational force and that is why when any metal placed in the water it will float and come on the surface.