Bitcoin
Proof of Stake – How is Ethereum slashing actually implemented?

In Ethereum, if a validator misbehaves, their funds will be confiscated/deducted. But how is it implemented in practice? Other validators vote, and if the majority votes, will some validators lose their funds? Or is it a more technical implementation? How does it work at the blockchain level?