There are times when the planets in our solar system line up in a row. At times this row is straight out from the sun, in other cases the planets are aligned offset from the sun and most often the alignments are only apparent alignments, looking as if the planets are lining up across the night sky. Different types of alignments have different names and rarity of occurrence.
TL;DR (Too Long; Didn't Read)
A phenomenon called a conjunction happens when the planets line up in the night sky.
Conjunction: Planetary Alignment
A planetary alignment is the common term for the planets being lined up at one time. A combination of at least two bodies lined up in the same area of the sky, as seen from earth, is a conjunction. In an alignment, NASA writes, the planets may line up with the sun or they may only appear in a line with the earth at an angle from the sun.
Syzygy: Group of Three
When at least three bodies are aligned in the same gravitational system the group is known as a syzygy. The most common occurrence of a syzygy is a solar or lunar eclipse. In a solar eclipse, the moon is in line between the earth and sun, blocking the view of the sun from earth. Conversely, a lunar eclipse occurs when the earth is between the sun and moon, blocking the light from the sun from the moon.
Common and Rare Conjunctions
Partial alignments, or conjunctions, happen relatively often, requiring only that two bodies line up in the same constellation as seen from earth. A full planetary alignment on one side of the sun, as calculated by John Savard of Quadibloc, will take place only once in over 1.6 million years due to the large orbits of outer planets. A full alignment with planets on either side of the sun is possible once in approximately every 516 years.
Superstitious Beliefs: Omens and Cataclysms
The alignment of planets has generated superstitious beliefs throughout history. These beliefs range from predictions about great and marvelous world-changing events to a shift in the polarity of earth and the end of the world. The most recent prediction is that in 2012 a planetary alignment will occur including a hidden planet, named Nibiru, and a shift in the earth's rotation will trigger events such as earthquakes that will destroy modern civilization. The predictions were false, however, as an alignment did not take place in 2012, Nibiru does not exist and, according to NASA, the rotation of earth will not be changing.