So we say
I could run fast when I was a child.
because it is a general fact, but we say
I was able to run five miles without stopping last night.
I managed to run five miles without stopping.
because we are talking about a specific time in the past.
I could play football well I was a boy.
Last night I managed to score four goals.
I could study all night when I was a student.
I wasn't able to concentrate on my studies last night.
English Grammar Reference: Ability - can, could , to be able to