How !?

How can you leave a marriage when there’s constant arguing and saying hurtful things to each other but other days there’s love and good times. How can we replace that above everything else? Especially when there’s children. I need women who been through this advice?? Please