Most types of permanent life insurance have some sort of cash value in addition to the face value of the policy. As that value accrues, you may be allowed to borrow against the cash value in a loan to yourself that must still be repaid, including interest charges. If you should pass away before the loan has been repaid, the policy itself will dictate how the insurance company will regain the lost loan.
If you do not pay back the full value of the loan, including the interest, it will be deducted from the policy before the proceeds are paid. If there is not sufficient cash value in the policy, the remainder of the balance can be deducted from the face value of the policy. With most policies, this should not be a problem as you are rarely allowed to borrow more than the cash value of the policy.
In a worst case scenario, the beneficiaries of the policy will receive less than the expected amount. It does not matter whether there is more than one beneficiary involved, as the remainder of the loan value will be subtracted from the policy before it pays out. If the policy is set to pay out at value rather than percentages, then the person who administers your final testament will also be responsible for dividing the actual value of the policy as closely to your wishes as possible.
Leaving an unpaid loan will not cancel the policy or have other severe consequences. Most permanent life insurance policies are set up to deal with such an occurrence, and you should be able to find out how the situation is handled by reading the policy carefully. If you cannot find the information in your policy, contact the customer service branch of your life insurance policy and have the information explained to you.