How is this circuit for level converting (5V3.3V) working?
When no device is pulling down the line, the "left side" (with lower voltage) is in high state by pull-up resistor. The voltage between the gate and the source is below the threshold voltage and MOSFET isn't conducting. So the "right side" (with higher voltage) is pulled up by pull-up resistor too.

When the "left side" pulls down the line to a low state, the voltage between the source and the gate rises above the threshold and MOSFET starts to conduct. So the "right side" is then pulled down to a low state via the conducting MOSFET.

When the "right side" pulls down the line, the diode between the drain and the gate connects the "left site" to low state, causing the MOSFET to conduct, so both sides are pulled low to the same voltage level.

More detailed description is in Level shifting techniques in I2C-bus design (PDF) in section 2.1.1, page 4.

If I made some mistakes, feel free to correct me.