The random first-order transition (RFOT) theory of the structural glass transition is reviewed in a pedagogical fashion. The rigidity that emerges in crystals and glassy liquids is of the same fundamental origin. In both cases, it corresponds with a breaking of the translational symmetry; analogies with freezing transitions in spin systems can also be made. The common aspect of these seemingly distinct phenomena is a spontaneous emergence of the molecular field, a venerable and well-understood concept. In crucial distinction from periodic crystallisation, the free energy landscape of a glassy liquid is vastly degenerate, which gives rise to new length and time scales while rendering the emergence of rigidity gradual. We obviate the standard notion that to be mechanically stable a structure must be essentially unique; instead, we show that bulk degeneracy is perfectly allowed but should not exceed a certain value. The present microscopic description thus explains both crystallisation and the emergence of the landscape regime followed by vitrification in a unified, thermodynamics-rooted fashion. The article contains a self-contained exposition of the basics of the classical density functional theory and liquid theory, which are subsequently used to quantitatively estimate, without using adjustable parameters, the key attributes of glassy liquids, viz., the relaxation barriers, glass transition temperature, and cooperativity size. These results are then used to quantitatively discuss many diverse glassy phenomena, including: the intrinsic connection between the excess liquid entropy and relaxation rates, the non-Arrhenius temperature dependence of α-relaxation, the dynamic heterogeneity, violations of the fluctuation-dissipation theorem, glass ageing and rejuvenation, rheological and mechanical anomalies, super-stable glasses, enhanced crystallisation near the glass transition, the excess heat capacity and phonon scattering at cryogenic temperatures, the Boson peak and plateau in thermal conductivity, and the puzzling midgap electronic states in amorphous chalcogenides.