Some species like wasps, bees, termites and ants have a cast system.
Wasps and bees have a cast system where all members of the nest have same genes but in workers only some are activated making it impossible for them to reproduce.
While termites and ants have many different forms; queen, king, warriors, workers, forgers etc.