If you are the beneficiary, then generally you get the money tax free from the life insurance company.
If you inherit it, it is subject to estate taxes.
Those are two different things, being a beneficiary, and inheriting.
However, if an individual is named as the beneficiary of a life insurance policy, the proceeds usually go to the beneficiary free from federal income tax.
Learn more about life insurance tax on how it works.