In order to buy life insurance on another person you must have an insurable interest in that person.
Insurable interest means you stand to lose financially if the insured person were to die. Or, you rely on the insured person for some form of financial support.
Usually, people with an insurable interest may include spouses, siblings, parents and their children, relatives and business partners, among others.
In addition, in order to buy lie insurance on another person you will need their permission/consent, their signature on the application for life insurance, and the insured person may need to answer some health questions, and/or take a physical exam.
Here's an article called who can you insure for life insurance that goes into more detail about insuring other people.