We think of the universe as being flat like a pancake, and it is, pretty much, but not exactly so.
Planets orbit at different angles to the sun's equator.
The earth, for example. And around the earth orbits the moon at its own angle. Think of an old 12 inch vinyl record as representing the earth's orbit around the sun. Now put a dime on the record's edge. This is the moon's orbit around the earth, but it isn't flat on the record.