Modal verbs

Ability

Can, could, be able to, capable of and know how to all express ability.

Can and be able to are similar in meaning. Be able to suggests that effort is required.

Can has only present and past forms.

Be able to is used for other aspects.

Be capable of is often used for things that are difficult or unusual.

Know how to means to be able to do something practical because you have learned it.

Could sometimes means knew how to. It refers to a permanent or general ability.

Was/were able to often combines the idea of ability and achievement.

Note that could is not possible in this context.

Managed to is similar in meaning to was/were able to. It suggests that effort was rewarded by success.