How can I wire this replacement ceiling fan?
Is there a switch in the room, and does the current ceiling fan have both a light and a fan?

The easiest way I've found to do this is to get a multimeter($5) and use it to determine which wire is hot (in the US, this is usually the black one).  The next challenge is to determine which wire (if any) is switched), and you do that by checking each wire with the switch on and off.

Chances are, your new ceiling fan has hot (black), neutral (white), and ground (green).
Typically, you would hook it up black -> black, white ->white, and green to either green or to a green grounding screw in the junction box, and you would cap (i.e. put a wire nut on) the switched wire.