The bare wire coming from the ceiling is the grounding conductor, and should be connected as described in the manufacturers installation instructions that came with the fan.
The green wire is also a grounding conductor, and should be connected in a similar fashion as the bare wire.
The white wire is the grounded (neutral) conductor, and should be connected to the white wire on the fan using a twist-on wire connector (or other approved means).
The black wire is a switched ungrounded (hot) conductor, and will be energized when one of the switches is closed (on). This should be connected to either the black (fan) or blue (lights) wire on the fan, depending on which function you want this switch to control.
The red wire is a switched ungrounded (hot) conductor, and will be energized when one of the switches is closed (on). This should be connected to either the black (fan) or blue (lights) wire on the fan, depending on which function you want this switch to control.
WARNING: Since I'm not there, I can't be 100% sure this answer is correct. I'm basing this on common installations, but there are no guarantees this is wired in a common way.
One foolproof method, is to connect the new fan exactly as the old fan was connected.