Keratinocytes originate from basal cells located in the stratum basale. These basal cells undergo mitosis, and the newly formed keratinocytes begin to migrate upwards through the various layers of the epidermis. During this migration, they undergo a process known as keratinization, where they progressively accumulate more keratin and lose their nuclei and organelles. By the time they reach the stratum corneum, they are fully keratinized, forming a layer of dead, flattened cells.