If your question concerns someone who has died, normally an individual would name an executor in their will, and this person would be responsible for carrying out the wishes of the deceased as dictated in the will. An executor is often a family member or a friend. If an individual has no family or friends, or none whom they feel is responsible enough to act as an executor, they might name an attorney who helped draft the will.
Outside the context of a will, the safest course of action is to grant a durable power of attorney to someone. Without any friends or family, this might be a lawyer or other neutral third-party. A power of attorney grants somebody the legal authority to act on the grantor's behalf, and make decisions around health or financial matters. It requires a written document signed by the grantor.
This is commonly done in case someone fears they may one day have health problems and become unable to make decisions on their behalf. The grantee of the power of attorney should make decisions, to the best of their ability, in the best interest of the grantor. They have a fiduciary duty to do so.