The orbits of the planets are coplanar because during the Solar System's formation, the planets formed out of a disk of dust which surrounded the Sun. Because that disk of dust was a disk, all in a plane, all of the planets formed in a plane as well. Rings and disks are common in astronomy.
Why are the planets parallel?
This “co-planar” orbital motion is due to the fact that during the formation of the Solar System from a cloud of collapsing gas and dust the Sun and planets settled into a disk structure. ... This is why the spin axis of the Sun is parallel to the spin axis of the rest of the solar system.
Why do all the planets orbit in the same direction?
When the cloud finally collapses, it forms a star and shortly after planets. However, angular momentum is always conserved. That's why planets all follow the same orbit, and why almost all of them rotate in the same direction.