is giving a 2 week notice a joke?

I wanted to ask because I been seeing post about people saying that they tried to put in their 2 week notice but their manager either refuse or denied it just so they can stay. Also my cousin had this issue before where her boss ripped up her resignation papers because she didn’t want her to work at another job. I’m actually looking for another job myself and I told my co-worker that I’m looking for something different and she said don’t tell them that you’re looking for another job because if you do they will fire you on the spot. Let them know once you secured the new job. I totally don’t get about the whole 2 week notice thing if they’re just gonna terminate me anyways if I try to do the right thing and give them a notice.

Author: Available_Ad5947