1. 90% of the answers in this thread are bad advice. Some of it really bad. A lot of it just misleading, bogus or exaggerated (on HN, it's bad form to criticize others, but when it comes to life-altering advice such as here, I can't let it stand).
2. It's too complicated to explain in a paragraph. It depends on too many factors.
3. The best lawyer site I have ever seen is http://usvisanews.com. Read this weekly for 6 months, then you'll start having an idea of how it works
A few facts:
a. anybody can incorporate a US corporation. You don't even have to set foot in the US, by the way, to do so.
b. the main issue is living in the US while having some kind of activity for a company. It's usually defined as work, and that's when you must be very careful and have the right status.