Qualification to do business in another state
Entities (e.g., corporations, limited liability companies or limited partnerships) may be required to "qualify to do business as a foreign [entity]" in a state other than the state in which the entity is organized. "Foreign" in this case does not mean a country other than the United States, but that the entity was incorporated or organized in a different state.
Requirement to qualify
Unfortunately, the requirements are often unclear, so it can be difficult to determine if an entity is required to "qualify to do business". Generally, if you have significant business contacts beyond only accepting orders by telephone or mail and shipping goods by common carrier into another state, you may be required to qualify.
Penalties for failure to qualify
Failure to qualify may prevent you from using that state's services, e.g., access to that state's courts, which could prevent you from suing someone you do business with in that state who does not pay you.
Some states permit you to "correct" the failure to qualify and then use their services, but, in a few states, e.g., Arkansas, the failure to qualify is "permanent", and e.g., you can not sue a defaulting party if you were not qualified at the time of the default.
Application for qualification
Qualification is typically accomplished by paying a fee and filing a form containing basic information about the corporation, e.g., name, state the entity is organized in, date of formation, business to be engaged in the state being qualified in, and the date business did or will commence in the state being qualified in. The form is accompanied by the fee, certificate of good standing issued by the secretary of state where the entity was formed, and sometimes financial information.
The entity must have a registered agent in the state being qualified in, who must be a resident individual or domestic corporation or other entity organized in that state. Residents of other states and "foreign" corporations and other entities are not qualified to serve as registered agent.
Generally the registered agent must sign the qualification form agreeing to serve as registered agent.
The requirement to qualify is not coincidental with the requirement to pay or collect taxes. Even if you do not have to qualify, you may have to pay income or franchise tax to, or collect sales or use tax for that state. The minimum requirements continue to shift, and are different from state to state, so care is needed. Again, generally, if your only contact (sometimes called "nexus") with a state is accepting orders by telephone or mail, and shipping goods by common carrier into another state, you do not have to pay or collect their taxes (some states maintain this limit only applies to sales and use tax, and not to income or business activity tax). But, with increased Internet and other interstate business, and state revenue shortfalls, states are increasingly concerned with loss of state revenue and trying to reduce the minimum contacts necessary to force companies to pay and collect their taxes, e.g., towards merely "exploiting" the state's economy.