I have done a lot of research on this and have talk with many software and IP attorneys about how it all works. One of the first things to understand is that you can learn the rules, but anyone can hire an attorney if they have the cash. So although these are guidelines, I'm not a lawyer, so this is just the result of my research and my interpretations of conversations with those that do know. disclaimer, disclaimer, DISCLAIMER!!!
So you have some friends that you want to make a game with and you need to start a legal company and understand the implications.
First, I would incorporate somehow, there's lots of stuff about it, but basically it keeps you apart from people suing the company. It also makes it easier for someone to leave and to add someone else. There are many types of corporations, you need to research them and figure out what works best for you. The fun part is that you each get a title, so someone gets to be CEO, another President, CTO if you have more. Give some titles out, Chief of all that is well and good

Next is the tricky part that you need to understand. It is doubtful that any of you would be considered employees of the company. You don't have money, the company is not paying you salaries, etc. So, although possible, it's doubtful that you are at that point. So although you are all owners, none of you are actual employees. This makes a big difference as I'll discuss below. But usually these start ups are just a legal entity in the hopes of making something. Unless you are lucky enough to get seed money, but that's a different thing entirely.
So since you are not employees of the company, you are stuck with the following:
http://www.copyright.gov/circs/circ9.html
Basically what this says is that whatever you create is yours, unless you are an employee of the company. Otherwise you must have a signed contract turning over the work to the company.
So you have some decisions to make here. Your game will be made up of solo work and collaborative work. Say you have only one programmer and they write all the code, or one artist and they do all the art. These are solo works and they own the copyright to their work. That means that they can leave and take their work with them and leave the rest of you high and dry.If a work is created by an independent contractor (that is, someone who is not an employee under the general common law of agency), then the work is a specially ordered or commissioned work, and part 2 of the statutory definition applies. Such a work can be a work made for hire only if both of the following conditions are met: (1) it comes within one of the nine categories of works listed in part 2 of the definition and (2) there is a written agreement between the parties specifying that the work is a work made for hire.
You may think that because you told them what to create or you spec'd out the artwork, or had a good idea that made it in the source code that you own some of it, not so: http://www.copyright.gov/circs/circ31.html. Ideas are not protected, only actual physical work is protected. Here is something written specifically about games: http://www.copyright.gov/fls/fl108.html. So the author, the one that actually created the work, is the owner and likely will retain copyright in your company. What can be copyrighted? Here's a pdf that explains, http://www.copyright.gov/circs/circ01.pdf. Art work is right there, so you'll have to work on that, source code is considered a literary work, all of us programmers already knew that

You better deal with this right in the beginning, because if the company does not get ownership or at least the right to use the work, anyone on the team can pull their work at anytime and take off.
The best way to do this is described in the above links, works made for hire. That means that you have to get everyone in the company to sign a contract that says the company owns their work. Now it would be more fair to say both own the work, so that if someone wants to leave, they can take their work with them while not destroying the game effort.
Here is a great place to get such contracts: http://www.thegameattorney.com/. Tom has helped me out a lot and really knows his stuff. His game dev kit is worth the price if you want to form your company and don't want to deal with all this legal stuff. Protect yourself now, or you will deal with it later. I don't know the stats, but I would bet that most game teams break up. This can destroy the game, or not. Depending on what you do at the beginning. If everyone is really about the game, they will allow this company to use their work if they leave. That doesn't mean the company can transfer or sell it, but just make the game with it. I don't know the legal terms, but it's important to get this settled up front while everyone is still feeling great about making a game.
There are a bunch of other stuff you need, it's all in that gamedevkit, but that above is something that I have become familiar with and asked about. I know that lots of us dream of making games, but you have to be prepared for everything. If one of the team refuses to sign the contract turning over their work, then it is probably best to not use them. Some sort of legal agreement must be met, otherwise that person could have the game pulled off of store shelves, hopefully you'll make it that far. I don't think that most people would do this, but business is business.
Hopefully this will be a little help to people and avoid potential problems. I wish that I had known all of this when MMG was started, but maybe my experience will help people avoid the same problems. Good luck!