Planets do orbit in different planes. But they tend to be close to just one plane, so the drawings of the solar system you see are pretty much correct.
This is because a solar system forms from a big cloud of matter. Once enough matter collects in one place it will collapse inward due to gravity. The matter at the center of the collapse becomes the star. But because the collapse is not completely neat and symmetric a lot of the matter will not collapse directly into the star, but instead fall into orbit around it. This matter eventually becomes planets and asteroids and things.
The matter initially orbits in many different planes. But eventually it averages out into a single plane as all the different bits clump together or collide. Similarly a lot of the matter averages into a nearly circular orbit as opposed to being more elliptical.
The planets are the result of all that clumping and colliding. But notably smaller objects like asteroids and comets are less likely to end up in orbits in that same plane. They can appear in any plane and generally have more elliptical orbits. They escaped most of that clumping and colliding when the solar system was formed.
Similar things happen at the galactic scale which is why we see lots of spiral galaxies that are mostly flat.
Latest Answers