Building codes will vary by region. Here in Hawaii, the blades of your ceiling fan must be at least 7 feet from the floor.
Most fans are designed for 8-foot ceilings, even when a light fixture is attached. If you have an 8 or 9 foot ceiling, install the fan with the pole/downrod that comes with your fan.
Lower than 8-foot ceiling
You must still maintain 7 feet of clearance between the floor and your fan blades. You must use a hugger-style fan. Also known as a snugger or low profile fan. Some companies make “low ceiling adapters” that will help to shorten the fan for low ceilings.
Low profile fan will only raise your fan 3-4 inches. IF your ceiling is lower than 7 feet 9 inches, it is unlikely that you will be able to pass the 7-foot clearance rule.
One word of caution: fans need space between their blades and the ceiling in order to perform optimally. ALL hugger-style fans have significantly reduced air circulation.
Higher than 8 Feet
On high ceilings, a longer pole/downrod is recommended. Depending on the ceiling height, position your fan so that its blades are 8-10 feet from the floor. The poles/downrods for each brand of fan are slightly different and they are SELDOM interchangeable.