As I know we can use both structures to talk about past ability , but is there any difference between them?
A. He could climb the mountain
B. He could have climbed the mountain
Both the sentences are correct grammatically, with a difference in meaning.
The word 'could' is the past tense of 'can'. It's used to mean that somebody was able to do something in the past. So the former sentence means that he was able to climb the mountain.
The phrase "could have" is used to mean that somebody was capable of doing something, but he actually didn't do it. So the latter sentence means that he was capable of climbing the mountain, but he actually didn't do so.