There is a red wire in my ceiling junction box. What does it do? Where would I hook the ground wiring from the fan?
Grounds are super simple.  They are all green, green/yellow or bare.  They should all be connected to each other and to nothing else. Ever.  EVER.  

This is one of the few really hard-and-fast rules in electrical, and it applies everywhere in the world except some old Soviet installations. 

If you have connected all the grounds that are present, that is all you can do.

If a site doesn't have any grounds, you can ignore it, or if code requires, you can retrofit a ground wire.  This process has rules which are, again, unique to grounds (far more permissive, actually).