Inheritance is the practice of passing on property, titles, debts, and duties when someone dies. Those things usually go to family members. People have had laws about inheritance for thousands of years. The question is often settled in a will.
If only sons and other male family members get the inheritance, it is called patrilineal inheritence. If only daughters and other female family members get the inheritance, it is called matrilineal succession. In some cases inheritance depends on legitimacy.
Cultural inheritance is called legacy. Genetic inheritance is called heredity. A kingdom may be inherited, and the person who is expected to inherit is called the heir apparent.
The person who gets the property and other things when someone dies is called the heir (male) or heiress (female).