Muhammad Al-Hakeem asked:
Why do all planets revolve around the Sun in almost the same plane?
One popular theory is that the planets formed out of a flat spinning disk of gas and dust (a similar shape to our galaxy).
Lmnre, Sun, 12th Aug 2012
Galaxies, Solar Systems, Moons, and Planetary Rings all tend to have generally planar orbits (except perhaps the central bulge in larger galaxies).
if you imagine a large cloud of gas and dust -- does not have to be flat or spinning -- and consider what is going to happen to it as it gravitationally collapses.