You pay a premium for a chosen number of years. If the person insured dies within that time, the insurer pays the sum assured to the nominee.
Term insurance is pure protection with no maturity benefit, so premiums are usually lower than for policies that mix insurance with savings.