When speed passes from one medium wave to another what happens?

it changes in velocity