This diode needs a little less than 0.7 V to conduct. So, almost no current flows for voltages less than 0.7 V. For the resistor, no curent means no voltage drop, so the voltage appears across the diode. When the voltage goes above 0.7 V, the diode starts conducting. It mostly "locks in" the conduction voltage of 0.7 V, so any extra voltage will go across the resistor instead. The current through the circuit is mostly determined by this leftover voltage