We are in co-dependency when we attach to another person even though the individual is emotionally immature.
Imagine your partner drinks heavily, and when you try to tell him lovingly to stop, he has anger outbreaks every time. Or maybe your partner has an obsession with you being unfaithful when you are not. It is tough to break free from a co-dependent relationship, but not impossible. This stress may lead to other problems, even addiction, because people drink or use drugs to cope.
A relationship like the ones described above would typically be ended; however, there is an incapacity to do so, like feeling trapped.