If you are in sole proprietorship of your business, you have a number of options to hand over your company when it comes time to retirement or pass away unexpectedly. If you do not have partners in your business, you are generally within your right to hand over the entire company to any person you may see fit to do and avoid estate taxes up to a point if you plan ahead of time.
One option to hand over a business to another and avoid some state and federal gift taxes is to gradually gift over percentages to the benefactor overtime before you pass away. If you do die before the entire transfer is complete, the heir may be on the hook for exorbitant estate/gift taxes. Currently, the estate tax exemption is $5.49 million over the life of one individual and up to $11.98 million for couples.
If you do have partners and you would like to retire or sell you your stake in the company, you may consider writing a buy-sell agreement into the language of your partnership agreement. These buy-sell agreements may be mandatory with the full understanding you intend to sell of your stake in the company to another or they may allow only the right of first refusal for the partner to buy the stake or pass and allow an other interested party to buy in.