The executor is responsible for appropriately distributing the net estate to the rightful heirs. In many cases, the heirs are clearly spelled out in a will, and this task is simple. Just enter the requested information in the Heirs tab (see Define Heir for instructions).
There are several overlapping terms used to refer to people who inherit from an estate:
To keep things simple, EstateExec uses the common term "heir" when referring to anyone who will inherit from the estate, and additionally uses the term "beneficiary" when dealing with assets that automatically bypass probate.
If an heir died after the decedent, then that heir's estate simply inherits whatever that heir would have inherited.
If an heir died before the decedent, then the following rules apply in priority order:
If there is no valid will, then the estate is considered intestate, and must be distributed according to state law in the decedent's legal state of residence. You don't necessarily need a lawyer in such cases, but one can provide reassurance that you are doing the right thing.
Generally, only spouses and blood relatives will inherit under such circumstances: unmarried partners and friends get nothing. Different states define these rules differently, but all give significant preference to a surviving spouse and direct children. If no spouse or children survive, then typically the children of the children inherit (i.e., the grandchildren). If no direct descendants exist at all, then inheritance typically reverts to the decedent's parents, siblings, grandparents, and other next of kin. If no relatives can be found at all, then the estate "escheats" to the state, meaning the government gets the property.
Note that if the estate owns real estate somewhere outside the decedent's legal state of residence, then that property must be inherited according to the state laws that govern that external jurisdiction. Consequently, that portion of the estate may get allocated differently, or go to different heirs entirely.
An executor does not have the authority to make charitable donations unless explicitly authorized by the will. In cases where charitable donations are authorized, the executor should treat such donations similarly to all other bequests and distributions, subject to any specific instructions in the will. In essence, the charity becomes one of the "heirs".
In many states, if the decedent's will leaves anything to a spouse who the decedent divorced after making the will, those bequests will be automatically invalidated. If an heir actually caused the death of the decedent, most state laws bar that heir from receiving anything, to prevent him or her from profiting from a crime. Some states bar adulterous spouses from inheriting, and other states bar people from inheriting anything from a child they abandoned. If you think there are extenuating circumstances for your estate, you should research the issue for the decedent's state, or ask an attorney.
See also Dealing with Heirs.