OpAmp Precision Half Wave Rectifier
This is your precision rectifier.







simulate this circuit &ndash; Schematic created using CircuitLab

But before that, lets go back and review some opamp (ideal) basics.


The opamp has no input current
The output will do whatever it can do make sure the inverting and non inverting terminals are the same.


For your question, the first point does not matter. The second point is what you are interested in.

On the positive cycle, you get some positive voltage appearing at the V+ terminal. The opamp will do whatever it can to make sure that the voltage is between V+ and V- are zero. So if V- = V+ that means that the cathode of the diode is the same as V+. But in order for that to be true, them the opamp must output V+ + 0.7. This is how it overcomes the diode. 

On the negative cycle, you have some negative voltage appearing at the V+ terminal. but because of the diode and its orientation, the output voltage from the opamp is going to go as far down as it possible can, because the diode has not turned on.