I will explain this on some example:
Let’s say you want to start a new business in California, for example, a restaurant. You will incorporate a new business (LLC or Corporation) in California and the business entity is considered domestic in California because your restaurant is located in California. After few years your restaurant is successful and you want to open another restaurant in Nevada. If you wish to use for that the same business entity (your LLC or Corporation incorporated in California) then you can but you will have to register this Californian company in the state of Nevada as a foreign business entity.
Basically, if you have an office, store, warehouse, business location, or employees in another state than your business is incorporated you will have to register this company in the new state as well.
Honestly, the paperwork and requirements are usually the same as for domestic companies so be sure before you choose some state for your new business. I wrote this article because I did this mistake couple of years ago when I formed my first LLC in the state of Wyoming but later started business in California and had to also register my Wyoming LLC in California as a foreign LLC. I could incorporate a completely new LLC in California but my E-2 visa is connected with Wyoming LLC. You can read about that here.