Both words have almost same meaning. There is subtle difference. ability is a quality of mind or body. Ability refers to the current position. Capability is possibility in future. If you can sing well now, this is your ability to sing. But if you cannot sing very well now but can be an excellent singer after training or practice, you are capable excellent singer.
ability is what actually you are doing and capability is what you can do,potential that lies within you. Basically your current achievement is because of your ability but if someone feels that you can achieve much more than this then he is talking about your capability.