The simple answer is that the executor is the person named in your will to administer your estate after you die. The executor is responsible for managing the estate, protecting its assets, and carrying out your wishes.
You can name as many executors in your will as you like, sometimes people name a solicitor as an executor, but this isn’t necessary. It should be noted that the executor can be held personally responsible for mistakes made in the administration of an estate and may consult as many experts as they believe is necessary.
The duty of the executor is to complete the administration of the estate so that the creditors can be paid and the remaining assets handed over to beneficiaries as soon as reasonably possible, whilst complying with the laws of the state that govern the administration of deceased estates.
In most cases the person appointed as an executor is beneficiary under the will. In certain circumstances there could be good reasons to appoint an executor who is not a beneficiary under the Will, either a friend or relative, or if the estate is large and/or complex a professional executor (who normally takes a percentage of the value of the estate.)