Keratinocytes originate in the stratum basale, where they undergo continuous mitosis. As they migrate towards the skin's surface, they pass through the various layers of the epidermis, undergoing a process of differentiation. By the time they reach the stratum corneum, they are fully differentiated, dead cells filled with keratin, providing a robust, water-resistant barrier.