A power of attorney may be used when a person is legally incompetent, but it can't be signed after that happens. It must be drafted and signed while the person is still competent. Otherwise, that person can't sign legal documents that will hold up in court.
If this sounds fairly straightforward, you should know that it's a very common problem. Often, people just don't start thinking about these things ahead of time and then try to do things in the wrong order.
For example, a child goes to the doctor because the one living parent, the child's father, has been struggling with mental health issues. The doctor determines that the father is in fact legally incompetent and unable to make his or her own choices.
The child, then, wants to make those choices and needs legal access to things like bank accounts, retirement funds, health care records and much more. At this point, the child calls a lawyer and asks for help setting up the power of attorney that will give him or her this ability.
This happens all the time, but it doesn't work like that. The father can't sign that power of attorney because he's legally incompetent already and can't sign away his own rights on those grounds. What he needed to do was draft the power of attorney in advance -- years ago, perhaps -- giving the child those rights if and when this situation arose. Then he would have been competent at the time of the signing and the court would know that was his real intention.
Do not make critical errors with estate planning. Look into your options in advance. As you can see, it's sometimes impossible to work backward.
Source: A Place for Mom, "5 Misconceptions About a Power of Attorney," Kimberley Fowler, accessed Jan. 12, 2018