Well, let's talk about intellectual property, since that's really where it seems like your focus is right now. Before I continue, though, I just want to briefly mention that you also want to make sure that you understand where you stand with other aspects of the law as well, things like taxes (Do you have to charge some kind of sales taxes? What sort of taxes apply to your income from the game?).
It should also be mentioned that if you are unsure you should always find a good lawyer who specializes in the field. Lawyers can be expensive, but not as expensive as the world of hurt you can be put in if you mess up.
Now, for laws on intellectual property (which would include both copyright and patent), it's a good idea to give yourself a fairly strong familiarity with it. For one thing, you don't want to accidentally steal someone else's work. For another thing, you don't want to accidentally steal the work of someone who will then proceed to sue you :D.
Copyright laws are, I think, fairly straightforward. Basically, if you didn't create it, you don't have any rights to use it. The exception, of course, being when you are given permission to use something. There is something called fair use which, in certain circumstances, allows a copyrighted work to be used when it would otherwise be considered copyright infringement, but there isn't a clear law on this, just a set of guidelines that a court can use on deciding a case. If you are creating you entire game yourself (or with a team) and not attempting to use resources you (or your team) didn't create, you should be ok with copyright in general.
Software patents are tougher, especially with the way things are going now with all of these high technology companies trying to buy up as many patents as they can. It is important to note that some technologies used in making games either are or have been patented at some point. One example that's talked about frequently is the Marching Cubes algorithm. Basically, you want to make sure you understand software patent laws for sure, and make sure you do your research on what patents might be related to what you are doing. For example, the common music file format MP3 is patented, and you're not supposed to be doing anything with MP3s in your software without getting a license for it.
The flip side of worrying about if you are accidentally going to infringe upon the rights someone else has on their intellectual property is protecting yourself. The cool thing about copyrights is that they are automatic (at least in the US, not sure about elsewhere). As soon as you create something, you own the copyright on it. Being able to prove that you created something before someone can always help. One way to do this is to register the copyright. Again, registration is not necessary, but it can help you to prove when you created something. Another option I've heard about would be to do something like mailing yourself a letter about how you created something. Then, leave it sealed and that way if the time comes that you have to defend your copyright, you have a sealed envelope that has a postmark date on it and you can prove that you created it on or before the postmark date.
Other forms of intellectual property, like trademark and patents, all have to be registered. It's probably a good idea to try to get a trademark on your game's name, your brand name if you have one, things like that.
Again, I should mention, that the safest thing to do is to talk to a lawyer who specializes or has experience in this field. (Most lawyers are not going to be an expert on every aspect of all laws, so make sure you get one that does have the experience in these laws!)