Until fairly recently, it was usual for life insurance policies to be filled with exclusions - lists of conditions under which there would be no payout. Common coverage exclusions were war, military service, aviation, dangerous hobbies like mountain climbing and scuba diving, and certain health conditions, like HIV. If your death was caused by one of those excluded conditions, the insurance company didn't have to pay.
The good news is that the world has changed, and life insurance companies have been eliminating exclusions, partly because it's good business - the fewer exclusions in a policy, the more confident consumers tend to be - and partly because certain risks are perceived differently than they used to be.
Two of the exclusions that are no longer part of most policies are those for HIV and aviation. The former is still an issue, but a patient who is HIV-positive won't be denied coverage for it. Instead, it will be treated like any other chronic health condition, though there will likely be an increased charge for a policy. Likewise, aviation is no longer considered terribly risky, so now, unless you're an extremely inexperienced pilot or an extremely old (say, in your 90s) pilot, there is no exclusion for it.
Otherwise, there are two types of exclusions that still exist. One is an "outright" exclusion that applies to everyone insured by a given company. An example of this is the exclusion for suicide. There are virtually no life insurance companies that will pay out death benefits to the family of someone who commits suicide. The other type of exclusion is an option that underwriters use at their discretion, when they don't like the risk associated with an applicant, or don't have enough information to set a price.
The reality, however, is that even those optional exclusions are rarely used. Instead, an applicant who is so far outside the norm that actuarial tables don't apply will be assessed some kind of "flat extra," which is an added fee per thousand dollars of coverage.