Why planet's orbit is not perpendicular or random ? It always seems each planet is revolving on the same geometric-plane around the star.
Short answer: conservation of angular momentum.
The origin of almost any planetary system is a sparse cloud. That cloud starts to contract due (typically) to a pressure wave crossing it.
The cloud fragments as it contracts, and each fragment is what we know as a pre-star cloud.
Since almost always there is some movement in the matter in each cloud, the cloud as a whole starts to rotate, very slowly. Contraction helps because, due to angular momentum conservation law, when the cloud contracts, the rotation accelerates.
Soon we get a protostar with the most contracted matter, surrounded by a protoplanetary disk composed with the less contracted matter. The rotation of the whole system is in the same plane, due to conservation of angular momentum.
The protostar becomes a star, and the protoplanetary disk becomes a bunch of planets. Each planet, in turn, orbits the star and rotates on itself, all in the same direction, based on which point of the protoplanetary disk started accreting mass.
Later on, interaction among massive bodies disturbs this shiny process by changing some orbits and by having some collisions, but that's minor.