Yeah, it goes both ways. There are exceptions for gross misconduct, but apart from that, if you’re on, say, a month’s notice, then
- you have to give them a month’s notice if you want to stop working for them
- they have to give you a month’s notice if they don’t want you to work for them anymore
Sometimes, instead of giving you notice, they’ll pay you what you would have earned during your notice period to have you leave immediately. (“Payment in lieu of notice”) I think the idea there is that they don’t want people hanging around if the company has decided to get rid of them.
Also: sometimes when you hand in your notice, your old employer will let you go sooner (so you can start your new job sooner). It depends how badly they need you for your notice period, and whether actually they could use the cash from your salary to do something else instead.