The exact how-tos and timeline differs widely by state. Basically, though, you first need to form a corporation of some sort. Then you apply for non-profit status for your corporation.
You also need to decide why and if you really need to do this. Two main reasons - if you are not affiliated with a non-profit it helps a lot with fund-raising, or if you are a school based group and want to handle your finances independently.
In 2006 we gave a presentation on this exact topic at the robotics conferences at Championships. You can get a copy of our slides at the link below (scroll down to near the end of the page). This presentation is old and the links may not still be accurate, but it gives an overview of the process.
Similar presentations have been given since then - check the NEMO site included in one of the earlier notes.
Good luck!
http://moe365.org/moeu.php