
When the voltage is positive, the diode will be OFF and no current flows. In that situation, the output is equal to the input.
When the voltage is negative, thle diode will be ON, current flows, and
the output voltage is zero (or -0.7v for a real diode).