A form S-1 (F-1 for foreign companies) can be thought of as a one time use registration and has three main uses:
IPO - Filed to register shares that will be sold in an IPO and may also include prior restricted shares from old shareholders.
Secondary offering - If the company wants to issue publicly tradable shares again after it becomes public, then it will need to file another S-1 specifically for that offering.
Resale Registration - A company can use form S-1 to register restricted securities or shares exercisable/convertible from warrants/convertibles. After the S-1 gets EFFECT, those share become freely tradable on the open market and can be sold anytime. A S-1 could also be used to register shares to be issued in Equity Line of credits.