The blades of a ceiling fan are pitched out of plane slightly. As a result, when the fan spins, the blades push air either up towards the ceiling or down towards the floor. Which direction it pushes air is determined by the direction the fan is spinning, and the direction the blades are pitched. The usual convention is given by the right hand rule: if you hold your right hand so that you can curl your fingers in the direction the fan is spinning, then it will push air in the direction that your thumb is pointing.1 When it's pushing air down on you, it will then be spinning in a counter clockwise direction as you look up at it. You can make it follow a left hand rule by reversing the pitch of the blades.
Once you have set the direction of the pitch of the blades, you can reverse the airflow by reversing the direction the fan spins. Many (most?) modern ceiling fans provide some mechanism to do this. The fans in my house have a small black switch that slides up and down. @Ignacio Vazquez-Abreams mentions using a pull chain in a comment to another answer.
In warm weather, you set the fan so that it pushes air down towards the floor. This causes you to feel a breeze, which cools you. In cold weather, you set the fan so that it pushes air up into the ceiling. You don't feel a breeze,2 but it circulates warm air from the ceiling towards the walls and down towards the floor.
- Box fans usually follow the right hand rule as well. You may find it easier to check some of this if you have a box fan handy. You can walk around the fan and hold a tissue in front of it from both side while watching the blades spin.
- You can check this with a box fan. Set the box fan on the floor, and turn it on. It will pull air from one side and push it out the other. You feel a breeze on the "out" side and feel a much weaker breeze (if any) on the "in" side.