If someone has a particular capacity, a capacity for something, or a capacity to do something, they have the qualities 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.
You often use ability to say that someone can do something well. He had the 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 the man. ...the director's idea of the actor.