What does this op-amp circuit do? (part of an ECG)
The right leg driver tries to drive the average voltage of the body to cancel out noise. The right leg is chosen because it is far from the heart, so any signal injected on there will be common mode to two electrodes near the heart.
The right leg drive is much more tightly coupled to the body than ambient noise it picks up from capacitive coupling to things like the AC power in the room.
The network in the feedback path of the right leg driver opamp provides some low pass filtering of the signal.
This circuit, and the need for it, make much more sense when you consider some things that aren't depicted. First, remember that is is necessary to establish some sort of reference voltage on the body, so that the voltage at the measurement electrodes has some reference with respect to the circuit.
Picture this reference being established by a Right Leg electrode directly connected to circuit ground. If a zero-impedance connection to the body could be made like this, we'd be done, and there would be no need for a driven leg connection.
In fact, the connection between the reference electrode and the circuit can be kiloohms, or tens of kiloohms. Now, because of the common-mode voltages riding on the body, and the fact that the reference electrode is connected through highish impedances to ground, there are stray currents. (This is less of a problem on the signal electrodes, which go into very high input impedances, as opposed to ground).
What the Driven Leg circuit does is use feedback techniques to measure the common mode voltage, and feed it back through the reference electrode. This effectively reduces the impedance of the connection at the reference electrode by a factor of the gain of the feedback.
I'm attaching Fig 1 from Winter, Bruce B., and John G. Webster. "Driven-right-leg circuit design." IEEE Transactions on Biomedical Engineering 1 (1983): 62-66., which show electrode impedances drawn in, but I highly recommend reading the paper if you can get it, as it shows very clear derivation of the effective reduction of impedance.