Capacity, in this context, concerns a party’s ability to enter into an agreement. A court may refuse to give effect to a contract if one of the parties does not have capacity. Examples are:

bankrupts—have limited capacity to contract as a bankrupt’s property vests in the trustee in bankruptcy
minors—for most contracts the age of majority is 18 years
persons of unsound mind—a person can plead their own unsound mind to avoid a contract if it can be shown that the contracting party knew of that insanity
drunkards—the courts consider that drunkenness may be a defence to an action in contract, in a similar way to cases concerning unsoundness of mind