It depends on the country and on the circumstances. I have worked in country where it had happened exactly on this way. We were all black workers. But not that is the usual way in the current developed world.
Normally, employer wants to protect himself and also you want to protect yourself from possible legal actions. Beside that, leave with bad cirucmstances might look very badly for you. Against it depends on the circumstances, and on the country, but what if your future employer, many years later, calls back this current job? Note, in the reality it happens quite rarely, but still possible.
What if they ask on the next job interviews, what happened with your current company? Note, guys having decade long interviewing experience, you come out better if you want to convince them about real things as about not real ones, so try to convince them about your trustability with the background that you are really trustable.
So, very likely you need to resign and you have some work contract saying a notice period, i.e. the time until you still work there (mostly, on close things what only you can - and giving time your employer to find your follower or re-organize the company to work without you).
Very likely, that it needs a written paper from you. It can be short, best if you search on the internet a template.
Important to have a copy about everything what you signed. If the company wants you to sign anything, either he should give it to you a copy, or at least they should allow to make a photo about it with your phone. In general, about everything what you sign, you are entitled to have a copy.