How to wire up a combined fan and light?
A bathroom overhead light position commonly has 3 separate loads in it: 


Overhead light
Fan 
Heat lamp or air blast heater


A perfect cable


source

The electrician who installed this did an excellent job future-proofing, going out of his way to use the rarely-seen 12/4 or 14/4 cable. This is perfect for a bathroom overhead light, because it provides all the wires you'll ever need, in one cable: black, red and blue are "hot" wires for all 3 of the above loads.  White is a shared neutral, and ground is ground of course. 

You can choose colors as you please, or as the bathroom switches are already wired.  You can tighten the wire-nut not-so-tight to hold wires together for testing, or pop the cover off the bathroom switch and see how that's wired. 

One of your wires will not be used; if it's not already capped, just put a wire-nut on top of it and tape the wire-nut onto the wire so it doesn't fall off (as they're prone to with only one wire). 

All the neutrals get tied together. 

Why does the fixture give two white wires?

They are both neutral.  One is the neutral for the lamp, and the other is the neutral for the fan.  This gives you the flexibility to feed the lamp and fan from separate circuits (in that case the neutrals would need to be separated.)