Life insurance does not care who the beneficiaries are, or their relationship to the insured. If a person is named as a beneficiary, it doesn't matter whether he is married to the insured, separated, amicably divorced, or divorced and hating the insured, with nothing anymore to do with her until the policy is changed to name a different beneficiary, he's still the beneficiary.
Life insurance is a contract. That means that beneficiaries are determined by the terms of the contract. Until the contract is changed, any insurance proceeds will be paid to the listed beneficiaries.
One of the many things you should do following a divorce is update all of your insurance policies and write in the new beneficiaries. The ex-spouse might still need to be mentioned if they are the next of kin and will care for any children, but you can include such instructions as well.
Sometimes an individual person is not named as a beneficiary. Instead, the policy's benefits flow to the insured's estate. If that happens, they will be distributed by will (if there is one) or by intestate succession (if there's no will). A will, like a contract, must be specifically changed to disinherit someone. However, intestate succession operates according to law. It takes cognizance of the relationship(s) among people. For example, in many states, under intestate succession, a surviving spouse receives the deceased's entire estate (all his or her belongings and assets). However, an ex-spouse, even if the ink is barely dry on the divorce decree, gets nothing. So if the insurance benefits went to the insured's estate, and if the insured didn't have a will but let intestate succession decide, then in that case, an ex-spouse would not receive the insurance proceeds. But if the ex-spouse had been named as the beneficiary on the insurance policy, she would.