new fan has 3 wires, 1-white, 1-blue, 1-black. coming out of the ceil is 1-red, 1-white, and 1-black
Without knowing how many switches control the fan, I assume you have 2 switches. 1 for the light and one for the fan. If this is the case, you hook black-black, white-white, bare(green)-bare(green), and red-blue. Then you should, if your house wiring is "normal", have the 2 switches controlling how they did before. Now, if you have 1 switch, then your red could be a traveler to another switch, a 3-way switch. In this case, the blue and black both go to black, white-white, bare(green)-bare(green), red to the other switch red(normally this would not have been unhooked if this is the case.)