How do self-adjusting hydraulic disc brakes work? I have Avid Elixir brakes on my mountain bike.  They are the only part of the bike that's a total black box to me.  I understand the principle behind disc brakes, and I understand the principle behind hydraulics.  I could draw a diagram of how this all goes together.  That said, I've been told that they automatically adjust for wear on the pads, so as the pads wear down, the braking action is the same.  Part 1 of the question: Is this true?  Part 2: How the heck does it work?
I think the answer he was looking for was how they adjust as the pads get worn.  There is a check valve in the master cylinder, that will allow enough fluid from the reservoir when the lever is pulled.  If more fluid is needed because of pad degradation, it passes it into the active system.  Therefore with more fluid in the system, the piston is pushed out slightly more and the pad is the same distance from the rotor.

That is why your res. needs to be topped off occasionally.