The page that mknauss references above has a link to the Service and Installation manual for the Hayward FD series (which is probably what you have if the heater is not too old). Starting on page 37 (Heating Mode) is a good description of what the heater does when it fires, followed by what it does when ignition fails. Basically, the heater will first run the blower and energize the igniter for about 20 seconds; then it opens the gas valve and starts looking for the presence of a flame. If a flame is not sensed within 4 seconds, it will close the gas valve, run the blower for about 30 seconds, then repeat the cycle. If the heater doesn't fire successfully within 3 attempts, you'll get the IF (ignition failure) code.
Observing *exactly* how the heater is behaving is key. From my own recent experience trying to diagnose intermittent ignition failures, accurately timing how long the "whoosh" is heard before it goes out is helpful in diagnosing the problem. If the flame lasts 3 to 4 seconds before going out, it likely means that the heater is not sensing that a flame is present (when in fact there is a flame). This could be a problem with the flame sensor itself (might need to be cleaned) or perhaps with bad grounding (this interferes with the flame sensing circuit). If the flame lasts less than 3 seconds or the whoosh sounds kind of weak, it means that the burner is not lighting properly. This probably means the gas supply is insufficient to support a flame, which could be caused by obstruction (common) or a faulty valve or regulator. If you have a propane heater, then it could be as simple as the tank is running low.