Universal life took whole life apart into its pieces. Premiums go into an account; each month the carrier deducts the cost of insurance for the death benefit that month, plus administrative and per-thousand charges; the balance earns interest. The owner chooses how much to pay, within a minimum that keeps the policy alive and a maximum the tax code allows, and can change it. Indexed universal life is the version where the interest credited is tied to the movement of a market index rather than a rate the carrier declares.
The index link works through options, not stocks. The cash value sits in the carrier's general account, and the carrier uses part of the interest it would have credited to buy options on the index. If the index rises over the crediting period, the account is credited with the gain up to a cap, sometimes scaled by a participation rate; if the index falls, the floor applies and the account is credited nothing, or a small fixed amount, rather than losing value. Dividends from the index's stocks are not included. The cap, the participation rate and the floor are set by the carrier and can be changed on existing policies within the contract's limits.
The trap is in the charges. The cost of insurance rises every year with age, and in the later decades it becomes large; a policy funded at the minimum in the early years, or one whose credited interest fell short of the illustration, can find the charges consuming the cash value and lapse when the owner is old, with nothing paid. A policy funded near the maximum from the start behaves very differently, which is why the funding plan matters more than the product.
The analysis reads the illustration at the guaranteed minimum interest and maximum charges, at a moderate rate, and at the agent's rate, and tells you whether the design works in the poor case and not only the good one. For a person who has not yet filled a retirement account, or who would fund the policy lightly, the usual recommendation is term and the retirement account.