This is a pretty weird situation continuity-wise but I think the assumption is supposed to be that he used Izanagi to survive the fight with Senju Harashima.
This doesn't make any sense anyway because Orochimaru should have been able to make himself immortal and invincible using Edo Tensei.And I´m annoyed by how casually Madara found a way to stay alive forever, when we spent so much time with Orochimaru and his dream of immortality, but seeing how hard it is to make come true.
Obito happened to phase-shift down into the ground right on top of Madara's secret hideout. Yes, it's just a startling coincidence.Also ... how did Madara move Obito into his hideout, when he cannot move away from the deusexmaschina-plant behind him?
It's called a joke.Yeah, wtf was that?!