The fixed peg means when the pulse wave goes to peg, it exerts an upwards force, and due to the third law, the peg exerts a downwards force which creates the inverted wave.
A wall or rigid support can be thought of as an extremely heavy section in which little is transmitted and most is reflected