Most ice in nature forms because of impurities which boost the exceedingly low nucleation rate of pure supercooled water. However, the microscopic details of ice nucleation on these substances remain largely unknown. Here, we have unraveled the molecular mechanism and the kinetics of ice formation on kaolinite, a clay mineral playing a key role in climate science. We find that the formation of ice at strong supercooling in the presence of this clay is about 20 orders of magnitude faster than homogeneous freezing. The critical nucleus is substantially smaller than that found for homogeneous nucleation and, in contrast to the predictions of classical nucleation theory (CNT), it has a strong two-dimensional character. Nonetheless, we show that CNT describes correctly the formation of ice at this complex interface. Kaolinite also promotes the exclusive nucleation of hexagonal ice, as opposed to homogeneous freezing where a mixture of cubic and hexagonal polytypes is observed.