If code is immutable, how are smart contracts upgraded?

One thing I'm struggling to put my finger on… if you deploy a smart contract to the blockchain, but discover a bug, how is it possible to upgrade/patch the smart cobtract? I read that this is happening, but I thought code was immutable. Are people just deploying a new contract and telling everyone to ignore the old one?
submitted by /u/neocybersonic
[link] [comments]