If you’re on an H1B, you must be employed by a company. If you get fired or quit, you must find a job within a couple of months or leave the country.
It's more about the restriction against quitting to work on your own thing, because you have to be gainfully employed by a company with a few restrictions such as the field. I know several people in the States who are miffed about that in particular, and are considering returning (or moving to Canda, where getting a PR is significantly easier) for that reason alone.