In general when a wave meets a boundary between two materials it is partial reflected and partially transmitted. The diagrams below show what happens in the one dimensional case for transverse waves. In both diagrams the incident waves are from the left.
The wave approaches from the left. On meeting the boundary it is partially reflected and partially transmitted. A phase change of 180 degrees occurs for the reflected wave but no phase change occurs for the transmitted wave.
On meeting the boundary it is partially reflected and partially transmitted. No phase change occurs for the reflected wave and no phase change occurs for the transmitted wave.