What types of waves can be refracted? Under what circumstances does refraction occur?

When a wave travels from one medium to another in which the refractive index is different. Air to glass, for example, or glass to air. air to water or water to air.