RC differentiator circuit explaination
edit
The negative voltage is a bit unexpected if you know that there isn't a negative supply. But it makes sense when we look at the voltage across the capacitor. When power is first applied the voltage on both sides of the capacitor is zero. We start the square wave, and the input goes to 5 V. Capacitors are reluctant to have fast voltage changes across them. You'll have to supply a lot of current to charge them fast. But the resistor doesn't allow this, so what initially happens is that the right side of the capacitor just follows the input; it also jumps to +5 V, and then slowly gets charged through the resistor. (Note that charging here means decreasing the voltage, since the voltage at the input is positive.)

When the input goes to zero something similar happens. Again the output will follow the input because the voltage won't change that fast. But the input was at 5 V and the output at 0 V. So when the input dives to zero, and the capacitor will maintain the 5 V across it the output has to go to - 5 V. 



I've added a third curve to your drawing. The top one is input, the middle one is output, and the bottom one is the difference between those, i.e. the voltage across the capacitor. You can see that it follows the familiar charge-discharge pattern, without fast voltage changes.
end of edit 

  

The lowering voltage(*) is due to the resistor. It will exponentially draw the output voltage down at a rate determined by the time constant RC. After 1 RC time the voltage will have dropped to 37 % (1/e), after about 5 RC times to 1 % (rule of thumb).  

Here's another way to look at it:
The negative edges are caused by the edges' high frequency. An edge has a wide spectrum, the steeper the edge the wider the spectrum. Unlike lower frequencies those high frequencies will pass through the capacitor almost unattenuated. So if the input shows a negative edge going from 5 V to 0 V you'll have a 5 V negative-going edge at the output. If the level is near zero at that time the voltage will go to -5 V. If the RC time constant would be higher the voltage will not have drooped as much, and the negative pulse may go for instance from +2 V to -3 V.


(*) I misused the word "discharge" here, which, as zebonaut rightly pointed out, is wrong. What you're doing is charging the capacitor. The input will be at +5 V and so will the output for a moment, since there's no change on the capacitor. As the output voltage decreases the voltage across the capacitor increases, which means it gets charged, not discharged.