Nolo Press publishes really good books on forming corporations, including one on non profits. They have them at any big chain bookstore or at nolo.com website. Good luck!
It's going to vary by state.
The first thing you're going to want to do, is develop your mission, role etc.
Then, you're going to need to file a short paper called "Articles of Incorporation" with the corporations division of your state government. It will have basic information about your nonprofit, such as name, purpose, address, AND a registered agent, which sometimes can cost some money. It costs like $30-40 to file in most states.
THEN you have to complete the forms for tax-exemption (both federal and state), which are extremely lengthy. You have to write all of the corporate bylaws, including voting rules, board of director rules, establish all of that. THEN you need to elect the board of directors.
Hope that helps.