When there is no water in the cup, the light from the penny experiences very little refraction and we can see the light from the penny.
When there is water in the cup, the light from the penny experiences refraction (bending) and reflection (total internal reflection, TIR) such the light it is not able to reach the observer’s eyes.
A small amount of refraction occurs as the light leaves the penny and travels through the bottom of the cup, then refraction occurs again as it enters the water. When refraction occurs at the side of the cup there is Total Internal Reflection because of the angle of incidence.
The light ends up travelling at such an angle that we are unable to see the penny.