To operate a business legally one needs to meet all the laws for operating a business in your country and local community. In the United States that means the laws of the federal government, state governments of every state in which you do business, and in many locales, even city and/or county laws governing business operation. While this may sound intimidating, there are multiple sources of helpful information
All of the U.S. states have business resource offices that provide information on the legal requirements for operating a business in that state. Note that you need to meet the legal requirements for every state in which you will be conducting business. This applies to internet transactions if you are going to be mailing a product into a particular state. Most states consider that a form of doing business in their states.
For the U.S. government, most businesses are going to need an Employer Identification Number even if they don't have employees. The Internal Revenue Service (IRS) provides clearly written documentation of what is required in terms of reporting. Other agencies may also have legal requirements. If you have employees, you will also have labor laws that you will need to follow. The Small Business Administration operates local offices in every state. These offices can be a great source of information about other local regulations you may need to be following.
For businesses operating in other countries, there are a wide variety of regulations. Check with international resources for locating the regulations that may apply for the country you are in or would like to do business in.
Not only are there laws and regulations governing the actual registration of the business and the business name, but there may also be licenses and permits needed to operate certain types of businesses. For instance, a restaurant may need health department or liquor licensing, a hair stylist may need to be licensed within their profession, or a child care service may need to have special permits from social service or educational agencies. You can find out more about such regulations from your state business resource offices.
You also may want to trademark your business name and/or logo. Take a look at Patents, Copyrights, and Trademarks to find out how to protect that valuable name you worked so hard to choose.
The one step we have ignored so far, but that is an integral part of your legal structure is what kind of business do you want to have? Your choices are a sole proprietorship, a business partnership, a limited liability company (LLC) or a corporation. Follow the simple How to Choose the Legal Form of a Business if you have no idea which would be right for you. The legal structure you choose is not permanently binding, but there can be complications in changing so consider it carefully.
One final step you may want to take to provide a good legal base for your business - and that is to identify a good attorney that you can use should you need legal advice. Establishing a relationship now can be good for opening opportunities in the future as well as having someone well versed in your business goals as an advisor as your business develops. To find a good attorney, ask your banker, your accountant or other professionals in your field for recommendations. Then put together a list of questions and interview more than one finalist to see who is a good fit for you and your business.