Why does the cyclization of open-chain glucose occur via the C5 hydroxyl group?
Due to the internal ring strain the best possible conformation is a six-membered heterocycle in this case called pyranose . A five-membered heterocycle may in rare cases also be formed, called furanose. (From left to right: α-D-Glucopyranose, β-D-Glucopyranose, α-D-Glucofuranose, β-D-Glucofuranose; courtesy of wikipedia)
      
Including the linear chain form they are all isomers (wikipedia), as they have the same chemical formula. More specifically the relationship between $\ce{linear &lt;-&gt; pyranose &lt;-&gt; furanose}$ is called constitutional or structural isomer.
The $\ce{\alpha-D &lt;-&gt; \beta-D}$ forms are diastereomers, or more specific diastereomeric conformers.