Suppose a will is being offered for probate (the process by which the decedent’s debts are paid and the assets distributed) and someone thinks (a) the writer of the will was mentally incompetent when they wrote it or (b) the writer of the will was being unduly influenced at the time (in other words, without the influence, the will would have been written differently).
Their best option is to file a will contest to try and prove their theories as to why the will should not be subject to probate. They might have an earlier will that benefits them and they want to offer that document for probate.
All of the above amounts to a will contest which boils down to litigation in the probate court. I’ve represented both sides. Sometimes it is a niece against an uncle, three sisters against a brother, brother against brother.
At the end of the trial, if there is not an agreed settlement that addresses the issue, the court will decide which will works; that will determine who gets what.
But wait, what if the will has a “no-contest” clause? If it does, the contestant may be jeopardizing any inheritance that is given the contestant in the will. Of course, if the contestant gets nothing in the will, there is no risk (generally) in bringing the contest.