Replacing dimmer switch w/ conventional
Make sure you install a proper fan support junction box that attaches firmly to nearby joists.  A regular lamp ceiling box cannot handle the dynamic loads (vibration etc.) of a fan.  An "old work" ceiling light box that merely clips to the drywall would be totally inappropriate. Drywall has no real strength. 

I don't know whether power comes into the switch box and onward from the fan; or into the fan and onward from the switch box.  Regardless, the wiring is the same.  Also, it's a rare situation where all wire colors match their purpose, so color coding does work here.  


All grounds are tied together. Each device gets a ground pigtail, i.e. there's a wirenut in the box joining all the grounds. 
All neutrals are tied together.  Each device that needs neutral (the fan) gets a pigtail. 
Black is "always-hot" in all cases, and all blacks are tied together.  Each device that needs always-hot (the switch) gets a pigtail. 
Red is "switched-hot".  One end goes to the switch.  The other end goes to the fan as its "hot" wire (typically wirenutted to a black wire on the load).