"What does it take to deem someone incompetent to take over their affairs?"
The issue of competency is quite complex. Different levels of competency apply for different legal matters. For example, the competency to sign a will can be lower than the competency to sign a revocable living trust which is a contract. Competency is really a legal concept, not a psychological one, even though some psychological principals are tests may be employed in the determination, and even if a formal evaluation is completed by a clinician. If the decision you are evaluating is whether an agent under a springing power of attorney (the power becomes effective when the principal cannot manage his or her affairs) the power itself may have a definition or mechanism for determining when the principal cannot handle his or her affairs. If you are endeavoring to determine competency for a guardianship proceeding you'll have to review state law. Incompetence may be accompanied by a disabling condition. If the person does not have the wherewithal to meet essential requirements of caring for themselves, maintaining their safety, or maintaining their physical health, they may be deemed incompetent. The difficulty with this type of explanation is each term used again needs to be defined and in the end a judgement call is often necessary in cases that are not clear cut.
The American Bar Association Commission on Law and Aging and the American Psychological Association published a report entitled "Assessment of Older Adults With Diminished Capacity: A Handbook for Lawyers" in 2005 which is a good resource. This might be available to you on the American Bar Association (ABA)'s website.