Star Wars: The Rise of Skywalker didn't really bother explaining how Emperor Palpatine managed to return. However, from what we can gather from both the film and tie-in books, he transferred his essence into a waiting clone body while he fell through the Death Star, and then spent years hooked up to machines which struggled to keep him alive.
It actually sounds like he may have gone through a number of bodies as the cloning process clearly wasn't strong enough to contain such a malevolent spirit. Palpatine's way of dealing with that was to get his granddaughter to kill him so he could live within her, though he later restored some of his power by taking advantage of Rey and Ben Solo being a Force Dyad.
It's all a little strange if we're being honest, but a newly revealed image from Star Wars: The Rise of Skywalker not only gives us a much better look at the villain's deformed appearance, but also the machines which were being used to keep him alive while he manipulated events to his liking (posing as Supreme Leader Snoke, for example).
He appears to be blind, while there are wires seemingly running straight into his head. The whole thing looks pretty cool, and it's a shame it wasn't elaborated on a little further in the movie.
What do you guys think of Star Wars: The Rise of Skywalker's take on Emperor Palpatine?