At its simplest, in exchange for paying a premium, the life office will agree to pay out a certain sum if the insured dies before a certain date.
If the policyholder does not die within the term, the policy merely lapses. There is no payout. These policies are usually cheap to buy and they perform the useful function of providing protection for those who benefit from the policy, such as family members, if the policyholder dies.
The same principle of protection applies to a number of other types of insurance whether the benefit is, for example, to provide specific help to a deceased's family, or to repay a mortgage.