the person who has the legal right to receive the property or title of another person when they die
John was the sole heir to a vast estate.
heir to the throne (=the person who will become king or queen)
the person who will take over a position or job after you, or who does things or thinks in a similar way to you:
Jonson was his political heir as leader of the Nationalist Party.