The blades of a fan are tilted. As they whirl around, they slice through the air and because of the tilt of the blades the air is forced forward as the blade pushes them out. This creates an area of low pressure (this is why airplanes fly, too, because the wings create lower pressure above them than below them). Air from behind rushes into to fill the gap, and the next blade comes down and slices through pushing that air forward as well.
So the tilt of the blades, one after another as they spin around, force air forward and suck in air from behind to be pushed out again.