Combining experiments and theory, we address the dynamics of self-propelled particles in crowded environments. We first demonstrate that motile colloids cruising at constant speed through random lattices undergo a smooth transition from diffusive to subdiffusive to localized dynamics upon increasing the obstacle density. We then elucidate the nature of these transitions by performing extensive simulations constructed from a detailed analysis of the colloid-obstacle interactions. We evidence that repulsion at a distance and hard-core interactions both contribute to slowing down the long-time diffusion of the colloids. In contrast, the localization transition stems solely from excluded-volume interactions and occurs at the void-percolation threshold. Within this critical scenario, equivalent to that of the random Lorentz gas, genuine asymptotic subdiffusion is found only at the critical density where the motile particles explore a fractal maze.