It covers an agreed time frame set out in the policy’s provisions - usually between 10 to 25 years. If you die after this period, then you do not receive a lump sum. If you continue to live after the policy’s expiration date, you will receive no refund on the payments you made during the course of the policy.
The second kind is usually called “life assurance” or “whole-of-life insurance”. There are many types of life assurance policy, but they tend to be more costly than term life insurance because they apply until you die - at which point you are guaranteed a payout.
Sometimes life assurance policies (e.g. “investment-linked” or “endowment” policies) will take a part of the premium you pay, and invest it. It’s especially important to speak with your financial planner when considering this type of product. Quite often, investment-linked/endowment policies can become quite valuable if the investment part performs well. However, the final payout to your family cannot be predicted and it might end up being less than you hoped for, as the value of the investments is not guaranteed and can go down.
Regardless of the type of life insurance considered, the cost of your premiums will vary depending on individual factors such as your age, medical history and present health.