As has been said: It depends on the game world:
In the Forgotten Realms, there is something above the gods - Ao the Overpower (which in turn has a superior who oversees all the realities). He has to approve of any candidate. He could theoretically obliterate any diety just like that, but he has taken a very passive role, and one of absolute balance. The only incident where he got active (apart from creating Realmspace in the first place) was the Time of Troubles incident.
There have been cases where a mortal slew a god and assumed his portfolio or parts thereof (like the mortal Finder Wyvernspur, who killed Moander the Darkbringer), even a case where a diety gave up most of his power to others (Jergal giving his power to Bane, Bhaal and Myrkul), and of course, mortals who were elevated by Ao himself (Cyric and the current Mystra). But all these incidents had the silent agreement of Ao, he could as well have denied any of them their power.
Another Example: Rokugan. It has the Celestial Order, with the greater Kami, lesser Kami, the Elemental Dragons, and all that. The Emperor is also part of that Order. At the very top were Lady Sun and Lord Moon, but they were replaced in the recent past by mortals, and now there's a new Lord Son and Lady moon.
Also, the Emperor can declare mortals to be deities, and the Celestial Order has to accept this. Now, Emperor Hentai XVI was a real bastard, and he elevated many people that annoyed him to godhood. So one was the God of Dung, the other God of Stupidity, and similar insults. Since the word of the Emperor is Celestial Law, these poor souls found themselves put into a very humiliating position for all eternity.