ability - capability - capacity
Do not confuse ability with capability and capacity.
You often use ability to say that someone can do something well.
He had remarkable ability as a musician.
...the ability to bear hardship.
A person's capability is the amount of work they can do and how well they can do it.
...a job that was beyond the capability of one man.
...the director's ideas of the capability of the actor.
If someone has a particular capacity, a capacity for something, or a capacity to do something, they have the qualities required to do it. Capacity is a more formal word than ability.
...their capacity for hard work.
...his capacity to see the other person's point of view.