As a general rule, all planets have an equatorial orbit, meaning they orbit on the same plane and the same direction as their host-star's rotation. This ties into our models describing planetary formation which, among other things, suggests that planets form in a structure known as a protoplanetary disk that is created alongside the new star system. Due to the angular momentum generated by a condensing cloud of gas and dust that's destined to be a new solar system, the cloud turns into a disk in a similar way that a ball of dough becomes a pizza crust when thrown correctly. When the solar system is done forming, all of the planets are already moving in that equatorial orbit, so they continue on their merry way.
Of the some 850 confirmed planets (09/13), about a dozen of them are known to have polar obits, which means instead of orbiting in an east-west type orientation along their host star's equator, they orbit in a north-south orientation along the star's poles. According to our planet formation models, this type of orbit shouldn't exist. So, the question becomes, why do we see them?
WASP-79b, whose artistic rendering can be seen in this picture, is a hot Jupiter; a class of gas giant that orbits extremely close to their host star. WASP-79b's orbital period is only three and a half days. Whereas all of the planets in our solar system orbit the sun within six degrees of its equator, WASP-79b orbits with a 106 degree tilt.
Everything we understand about planet formation decrees that WASP-79b didn't start out in this type of extreme orbit. Astronomers are working on figuring out how a planet goes from a perfectly reasonable equatorial orbit to a polar one.
Hot Jupiter's are thought to form further out from their host stars before migrating inward (likely ejecting any other planets in the solar system). At the moment, astronomers believe this migration might somehow lead to the orbit of the hot Jupiter to be distorted giving it a signature of a polar orbit; the last remaining artifacts of the planets it so brutally threw out of the solar system. It's also possible star system with the polar orbiting planet interacted with another star in its early history.
For now, astronomers need to run some simulations in an attempt to figure out how a migrating planet's orbit can become misaligned leading to polar and even a few retrograde orbits.