Which property causes a pencil to appear bent or broken when it is placed in a glass partially filled with water?

Refraction is the property that causes a pencil to appear bent or broken when it is placed in a glass partially filled with water. Refraction occurs when light waves pass from one medium to another with a different optical density, causing the light rays to change direction. This change in direction can create the illusion that the pencil is bent or broken.