"could" is one of those words that has too many different meanings, and you have to pick one based on context and gut feeling. It can be a past tense of "can" or it can be part of a conditional sentence in the present.
"I could fix the computer." can be the past tense of "I can fix the computer." with the implication that you can't fix it now. Maybe you forgot how to do it.
"I could fix the computer." can be the past tense of "I can fix the computer." with the implication that you tried and you succeeded.
"I could fix the computer." can be the second half of a conditional sentence, like "If I had a screwdriver, I could fix the computer." Even without an "if", it suggests something like "if I want to" or "if I know how". I am not sure what this is called, so I've asked another question here.
If you just write "I could fix the computer." and no context is known, it's the third meaning.
In the full sentence: "The computer crashed, but I could fix it." it is clear that the second meaning is intended. The first meaning doesn't make sense at all, and the third one doesn't make sense because "but" implies that you solved the problem. If you say "The computer crashed, and I could fix it." now it is the third meaning, although the second is also possible.
The first meaning can occur in a sentence like "Before I lost my memory, I could fix computers." To get this meaning without adding any context, we can instead say "I used to be able to fix computers."
There is also a similar sentence: "I could have fixed the computer." is counterfactual. It means that if I tried to fix the computer, I would have succeeded, but I did not try.
"She could pass the exam" is similar to "I could fix the computer" and by itself has the third meaning - there's a possibility she will pass but you're not sure about it. In context, either the second or third meaning makes sense. Either she did pass the exam, or you think it's a possibility but you're not sure.
"she hadn't studied much" is a past perfect tense and makes it clear that the whole sentence is in the past - so this sentence is actually unambiguous (meaning 2). If you change it to "she hasn't studied much" now the studying is happening in the present and the exam is going to happen in the future, so it must be meaning 3.
"be able to" gives you more tense options. Past tense is "was able to"; uncertain conditional (or whatever that is actually called!) is "might be able to". "She was able to pass the exam" or "I was able to fix the computer" is unambiguous - it is certainly the second meaning. (Unless we add some context to get the first meaning, like "Before I suffered brain damage, I was able to fix the computer")
You probably know this already, but just for completeness: in future tense, "be able to" is always used, because "can" - like most modal verbs - doesn't work in future tense. In some other languages, such as German, we can say "I will must can buy new batteries." but in English we have to say "I will need to be able to buy new batteries."