If you've never had a fan or ceiling light fixture in the room before, install a junction box in the spot where you want the fan. Mark the location with the electrical box you intend to use by tracing its outline on the ceiling with a pencil. Next, cut a hole along the outline with a keyhole or saber saw. Install a support for the box by nailing a 2-by-4 to the ceiling joists. Fit the box into the hole until the bottom edge fits flush with the bottom of the ceiling. Nail it to the 2-by-4. If there was a light where you want the fan, you can probably use the box that serviced the light. But you might still need to install the supporting 2-by-4, depending on how much weight you think the light box can hold.
Before wiring the box, shut down the power by finding the breaker for the circuit the fan will use and flipping the switch to "off." Place a piece of electrical tape to mark the switch to be sure no one accidentally turns the breaker on while you're working on that circuit. Install wire of the correct diameter, usually a 12-gauge insulated wire. Run the wiring nearest to where you want the fan in the ceiling to the junction box, strip it, and wire it to the junction box by screwing the bare wire to the box. You should find wiring you can use in the ceiling somewhere near the middle of the room, because when electricians wire a house, they usually run the wiring from one room to another through the ceiling. Push a few inches of the wire down into the box, enough to enable you to make the connections to the fan, and connect the other end to the existing wiring in the ceiling.
Now you have a mount to which to install the fan. If you're replacing an existing fan, you can omit the previous steps, because you'll already have a mount. However, you still need to shut the power to the circuit. With the power off, attach the green ground wire on the mounting bracket to the green ground wire in the ceiling and, using your hands or pliers, twist them together tightly. You don't have to insulate this connection because the ground wire isn't live. Next push the mounting bracket up into the ceiling and secure the mounting plate to the box by using the two screws that came with the fan. Strip enough insulation from both the white and black power wires--about 3/4 of an inch--to enable you to twist them together, again using your hands or pliers, and cap them securely with insulated wire nuts. You can also wrap the connections with electrical tape if you like, but it's probably not necessary.
If the fan is going to operate in the hanging position, install the down rod by sliding it into the fan housing, pushing the canopy on top of it, and loosening the washer on the canopy. If it isn't a hanging type of fan, just loosen the washer on the canopy. Slide the fan housing up into the ceiling and tighten the washer onto the canopy to secure the fan. Screw the blades onto the blade bracket until they're secure. Insert lightbulbs into the light sockets and install the light shades if the fan came with lights. Finally, install the pull chain or chains onto the fan, turn the breaker back on, and see whether the fan works. When it does, you've got yourself a ceiling fan.