When using life insurance with a buy-sell agreement, either the company or the individual co-owners buy life insurance policies on the lives of each co-owner (but not on themselves). If you were to die, the policyowners (the company or co-owners) receive the death benefits from the policies on your life. That money is paid to your surviving family members as payment for your interest in the business. If all goes well, your family gets a sum of cash they can use to help sustain them after your death, and the company has ensured its continuity.
If sufficient cash values have built up within the policies, the funds can be accessed to purchase your business interest following your retirement or disability.