A testamentary trust is set up within a will, activated upon death, to manage assets for beneficiaries, especially minors or those with special needs.