Ability means the skill to perform something special.
Capability means the ability of a person to learn or to do something.
Ability is the synonym for capability.
Ability : The driver has the ability to drive the car.
Capability: The car has a capability of running at a higher speed of 120 /km.
Ability: Shreya has developed unusual ability as a dancer.
Capability: Shreya's capability of dancing to any tunes is well-known.