For this one, I am going to use an excellent explanation from grammarist.com
ability vs. capability vs. capacity
Ability, capability, and capacity are synonyms in many of their uses. All are frequently used to refer to one’s power to perform an action. For example, one might have the ability, capability, or capacity to read two books in a week. But capacity—which is extended figuratively in the senses it shares with the other verbs—has special uses it doesn’t share with the others. It tends to relate to volumes and quantities; for example, in the sentence, “The vehicle’s fuel capacity is 120 gallons,” capacity refers to the measure of the vehicle’s ability to hold and is not interchangeable with the other two verbs. “The vehicle’s fuel ability” would not sound right.
Another distinction commonly drawn between ability and capacity holds that, in humans and animals, capacities are inborn, while abilities are learned. For instance, a child might be born with the capacity to become a chef, but the ability to cook must be learned
Capability, meanwhile, often refers to extremes of ability. For instance, if you say you have the ability to write well, I might ask whether you have the capability to write a 10-page essay by tomorrow. Also, capabilities tend to be either-or propositions, while ability tends to come in degrees. For example, I might say that while I have the ability to write, I don’t have the capability to write a novel. But as with most of the other distinctions between these words, the lines are blurry, and the words are interchangeable despite the general usage patterns.