In The Return of the King, after the Ring got tossed into the fires of Mount Doom, the Eye of Sauron burst into flames, and the tower of Barad-dûr then collapsed. Then then Eye shrank to a small point and exploded. What was actually happening there?
I don't know that the specific visual effects in the movie are explainable beyond 'it looked cool', but as for the events - when the Ring was destroyed, the power Sauron put in it was lost, and everything Sauron used the Ring to make was undone.
As Gandalf says in ROTK -
If it is destroyed, then he will fall; and his fall will be so low that none can foresee his arising ever again. For he will lose the best part of the strength that was native to him in his beginning, and all that was made or begun with that power will crumble
The foundations of the Barad-dur (Sauron's Dark Tower) were made with the Ring, so upon its destruction, the tower falls as its foundations are destroyed.
Sauron is a Maia - a spirit which can assume a body to act in the physical world, but in its own nature is inherently incorporeal.
He didn't technically "die" at the destruction of the Ring, but he lost so much of his power that he was thereafter unable to do anything meaningful or manifest a new body; Gandalf says
a mere spirit of malice that gnaws itself in the shadows, but cannot again grow or take shape.
("take shape" referring to assuming a physical body, which he was able to reconstruct after previous defeats - in the Downfall of Numenor, and by Gil-galad, Elendil, and Isildur at the Battle of Dagorlad).
Your simple answer would be: Peter Jackson's special effects.
It's just to make the Fall of Barad-dûr look much more interesting on film.
For the book The Return of the King, this is roughly what happens to Sauron.
The realm of Sauron is ended!' said Gandalf. 'The Ring-bearer has fulfilled his Quest.' And as the Captains gazed south to the Land of Mordor, it seemed to them that, black against the pall of cloud, there rose a huge shape of shadow, impenetrable, lightning-crowned, filling all the sky. Enormous it reared above the world, and stretched out towards them a vast threatening hand, terrible but impotent: for even as it leaned over them, a great wind took it, and it was all blown away, and passed; and then a hush fell.
The film scene was not written inside the book, and hence a canonical answer for this question cannot be given.