Simple (ideal) op-amp rules:
1) Both inputs have infinite input resistance and will not draw any current.
2) The output has zero impedance and can supply infinite current.
3) Whichever input has the higher potential “wins” and the output will swing in that direction. If the + pin is more positive than the – pin, the output will swing positive and if the – pin is more positive than the + pin, the output will swing negative.
4) Both inputs want to be at the same potential. If one is tied to ground, the other will want to be zero volts (virtual ground).
5) The output will do whatever it has to, to make both inputs the same potential.
Take the circuit Mike posted and put some values in there… Rg=Rf=1K and Vin=10V
The plus pin is tied to ground. This means (#4 above) the – (inverting input) will want to be at zero volts.
Since the inverting input want to be at zero volts, that means that Rg has Vin minus the inverting input voltage across it, but because the – pin is at zero, the voltage Vg appears across Rg, so Vin/Rg= I1 or 10V/1K=10mA
Since current can’t flow into either of the input pins (#1 above), and it has to go somewhere, the only other path is through Rf, so I1 = I2 =10mA
10mA through 1K will be 10V, but current flows from plus to minus and the “+” end of the resistor is at zero potential. That says that the “-“ end of the resistor has to be 10 volts below that potential, or the output of the opamp is at -10V (#5 above).
With “real world devices”, there is some input bias current, input offset voltage, max output current, etc. but for learning the basics, just apply the rules.