In simple words, skill is something which has been learnt and can be seen most of the time in work. For example, a vehicle mechanic has the skill to understand and fix vehicle problems. that's apparent.
Ability is a mix of skills, attitude, knowledge and behavior. Now if the same vehicle mechanic goes one step ahead and does something extra with the vehicle which delights the customer that is competency.
Its like an iceberg model. What you see on the top is basic skills, IQ and knowledge.
What is beneath the surface is a mixture of knowledge EQ, skills, behaviors i.e competence.
To measure competency, there are several ways. Simple task- as HR you have to identify the competencies which the profile (the workman's profile) needs to complete the task in a manner and then you have to assess whether the person sitting in that profile exhibits the competency to what degree.