Here is a simple way to think about it:
The process usually would start with a term sheet describing the transaction. Once those terms are agreed upon, it may be best to share them with an attorney, so they can draft them into a letter of intent that spells out those terms in more concrete detail. You would then enter into an exclusive period with the buyer where the buyer conducts additional diligence. After 30 to 90 days, the transaction would close and initial payments would change hands.
There is a formal legal process for an acquisition, so it would behoove you to hire an attorney. You can get pretty far with a term sheet before you hire an attorney. During diligence, you typically negotiate the purchase agreement which is a much longer and more complicated document.
Remember it's always in the seller's interest to maximize the details of the transaction prior to conducting diligence.
A typical term sheet may have the following terms:
- Payment Terms (stock, cash, dividends)
- Treatment of working capital
- Incentive Payments
- Employment Agreements/ Non-Competes
- Treatment of Liabilities, Warranties and Representations
- Anything else relevant to your transaction
Here is a link to a standard form agreement for a LOI.
Importantly, every transaction is unique and complications always arise. There are different ways to acquire companies (asset transactions, stock transactions, etc) and tax impacts are also relevant. I'd recommend you find someone with experience in the area.
Alternately, you may sell something more simple like your customer list and sign a non-compete and employment agreement with the acquirer to simplify the legal issues.
Hope that helps.