If you quit the job, regardless of reason, you have the "burden of proof " to show the unemployment system that you have a very good job related reason to quit the job. IF you can do this, you may be approved to draw benefits. But it does have to be pretty serious. Accusing you of making mistakes, yelling at you, really harrassing you and creating a bad place to work telling you constantly that you are in danger of being fired....not good enough. Not paying your paychecks,physically assaulting you, asking you to work in unsafe conditions... maybe.
But if they terminate you, it has to be them that has the burden of proof that they had a very good job related reason to terminate. In otherwords, that you knew what you were doing was wrong, or not what they wanted, or not up to spec, and you had the opportunity to change your behavior and keep your job, and you chose not to do it. Barring gross misconduct (something so bad you should have reasonabley known it was wrong to do it, even one time) it is harder for them to get you terminated. And it is very wise not to let them goad you into quitting. Keep looking elsewhere, but keep doing your job, showing up on time, cooperating as much as you can with them, and then if they decide to fire you, so be it, but don't be pride driven and dumb and let them push you into quitting. If they holler "Why don't you just quit?" still insist they fire you. Contrary to what they may tell you, it doesn't "save your reference" or look better anywhere. IT just means you don't get unemployment benefits (as easily) and they avoid having to pay the unemployment taxes involved.