I'm sure someone will chime in with more details but the player's contract is still on the payroll the following season but that player will not be counted towards the salary cap. Most teams do this to avoid the dollar for dollar Luxury Tax rule.
Some teams negotiate a buyout with the player. It also frees up a roster spot.
"If I was Kobe," AI continues, "I'd have begged Shaq to come back, and if I was Shaq, I would've begged Kobe to come back. Ego ain't going to get you nothin' except an early exit."