It is created to address any estate accumulated during that person's lifetime or generated as a result of a postmortem lawsuit, such as a settlement in a survival claim, or the proceeds from a life insurance policy held on the settlor.
A trustee is appointed to direct the trust until a set time when the trust expires, such as when minor beneficiaries reach a specified age or accomplish a deed such as completing a set educational goal or achieving a specified matrimonial status.
In practical terms testamentary trusts tend to be driven more by the needs of the beneficiaries (particularly infant beneficiaries) than by tax considerations, which are the usual considerations in inter vivos trusts.
An infamous example is Re Diplock [1951] Ch 253, which resulted in the suicide of one of the trustees who was personally liable to account for trust funds that had been disbursed for what he thought were perfectly valid charitable trusts.
However, a testamentary trust may be a better solution if the expected estate is small compared to potential life-insurance settlement amounts.