It is best to ask for a wiring diagram from the place you obtained the ceiling fan from.
If they say they have not got one, or the fan was not bought new, then maybe you can find out the manufacturer's name from a label on the fan or on the box it came in? If you have the manufacturer's name you may be able to find their web site, phone number or street address so you can ask them to send you a wiring diagram.
The usual 120 Volt household AC wiring colors are:
Black is a "Hot" or "Live" wire which may come direct from the main breaker panel so is always "on". (But sometimes this wire is the one coming from the on/off switch controlling the lighting fixture.)
Red is a "Hot" or "Live" wire which may come from the on/off switch controlling the lighting fixture. (But sometimes this may be the wire which comes direct from the main breaker panel so is always "on".)
White is a "Neutral" wire.
Green (or bare wire with no insulation) is the local "Ground "wire.
What the Blue wire does is not obvious from the question as asked and should be found out from the wiring diagram for the fan.
If you can't get a wiring diagram and you still can't work out what to do then you should ask someone who knows how to handle mains electricity safely to advise you.
Better still, for your own personal safety, have a licensed electrician install the ceiling fan for you.
It should be a black/white pair from the box in the ceiling: black is normally the "hot" and white is the "neutral". (Maybe in your case the "hot" is the red wire?)
One of the blue and black wires on the fan goes to the fan motor and the other maybe goes to an optional light in the fan housing? Before you connect them, you must check the wiring diagram or ask licensed electrician for his advice.
Only when you know for sure what they do, those blue and black wires should be connected to the the ceiling box. Often the black wire is the main "hot" wire on a fan unit.
The white wire on the fan connects to the white "neutral" wire in the box.
The bare (ground) wire on the fan must be connected to the ground wire in the ceiling box. Some wiring codes allow you to connect it to the white wire if there is no separate ground wire, but it is an unsafe method and it may be illegal to do this if your local wiring code does not allow it.
YOU MUST CHECK WITH THE LOCAL ELECTRICAL SAFETY OFFICER FOR YOUR LOCALITY BEFORE YOU DO THAT.
As always, if you are in doubt about what to do, the best advice anyone should give you is to call a licensed electrician to advise what work is needed.
If you do this work yourself, always turn off the power
at the breaker box/fuse panel BEFORE you attempt to do any work AND
always use an electrician's test meter having metal-tipped probes
(not a simple proximity voltage indicator)
to insure the circuit is, in fact, de-energized. IF YOU ARE NOT ALREADY SURE YOU CAN DO THIS JOB
SAFELY AND COMPETENTLY
REFER THIS WORK TO QUALIFIED PROFESSIONALS.