'couldn't' is a contraction of 'could not.' It functions as a modal auxiliary verb, which is used to indicate ability, possibility, necessity, or obligation in the negative form. In the case of 'couldn't,' it often denotes an inability or impossibility in the past or a strong assumption in the negative.
I couldn't understand his accent, so I asked him to repeat himself.
It couldn't have been James at the door; he's out of town this week.
When I was a child, I couldn't stay up past 9 PM.
'couldn't' is often used to express a past inability, but it can also be used to make strong assumptions in the present. For instance, 'She couldn't be the thief' suggests a strong belief that she isn't the thief based on the information available. Be cautious about the context. 'Could' can indicate both ability and possibility, so 'couldn't' can negate either of those. For example, 'I couldn't swim' might mean the person didn't know how to swim or that they were unable to swim at that particular moment (maybe due to an injury). Avoid double negatives. Since 'couldn't' is already negative, you shouldn't pair it with another negative, like 'I couldn't not go to the party.' Instead, rephrase for clarity.