- Could (as past tense of can) denotes ability but it does not denote completion of the action.
- Was able to (as past tense of can) denotes ability and completion of the action.
- Last night, I could do my homework. (This does not mean that you actually finished your homework. Maybe you finished or not. You only declared that you had the ability)
- Last night, I was able to do my homework. (This means you had the ability and you really finished the action.)
For more grammar tips. Click this link