If you're divorced, Social Security allows you to file for retirement payments based on your ex-spouse's benefits. This has no effect on the benefits your ex receives; it doesn't come out of the same pot. The option is only available if both of you are eligible for retirement benefits. The lowest age for eligibility is 62.
You can only apply for spousal benefits if the marriage lasted 10 years or more and you're currently unmarried. The maximum benefit, available if you wait until your full retirement age, is half your spouse's full benefit. If you earned enough that your Social Security income is higher than his, you probably can't claim spousal benefits. If you work while receiving spousal benefits and you're under your full retirement age, your earnings will reduce your benefits.
If your ex is dead, you can apply for widow or widower benefits, provided your marriage lasted at least a decade. You can start receiving reduced benefits as early as 60. If you remarry after you've turned 60, your marriage won't affect your right to benefits.