Book 2 Episode 7 first explains this situation through flashbacks.
Upon Iroh's only son being killed in battle at Ba Sing Se, (notoriously power-hungry) Ozai requested of their father Firelord Azulon to make him his heir instead, seeming how he had live offspring to secure royal succession.
Such a request was met with disgust and outrage by Azulon and the details of his reaction were picked up by Azula while eavesdropping: Ozai was to suffer a penalty for this insult by sacrificing Zuko, his own firstborn.
Ursa (Ozai's wife) seemingly learned about this from Azula upon questioning (she was teasing Zuko about it and Ursa overheard) and all we know from there is that Ursa suddenly leaves; Azulon, who was "perfectly healthy" as described by Ursa at the begging of the episode suddenly dies overnight and that on his "death wish" he was to be succeeded by Ozai, even though the audience knows better, from Azulon's previously depicted outrage at this idea.
The dubious circumstances of this event were not clarified until Book 3 Episode 11, when Zuko confronted Ozai. Ozai explained that the reason Ursa was banished is that she proposed a plan to spare her beloved Zuko's life, a plan on which Ozai agreed because it meant him getting the power he wanted.
So, pretty much they both threw a coup of sorts: Ursa killed Azulon (she is the most heavily implied culprit of this) and was subsequently banished (I can only assume so she wouldn't be tempted to tell anyone the truth) while Ozai became the new Firelord, to which we can only speculate he either flat out lied about Azulon's "death wish" and people believed him, or he forged Azulon's will. All this being possible because Iroh was still away at the Earth Kindgom, or on his way home, as implied in B2E7, or maybe too grief-stricken to act. Either way, Iroh is not depicted as being present at Ozai's coronation ceremony.