It really depends on the company and why you are going. I gave 6months notice when I worked at Apple (FIRE) and slowly offloaded all my responsibilities. I documented many things for whoever would come in to replace me. They gave me a going away dinner and I still connect with former colleagues.
I left a shitty job with no notice, and still got a going away dinner! The key is to be a good coworker, not be an asshole, and try not to leave a total mess for the next person. Oh and don't work for psychopaths.