Selective Breeding
The process is called selective breeding. Breeders identify desirable traits, mate cats with those traits, select offspring that best match the goal, and repeat over generations.
This has created the wide variety of cat breeds with unique appearances and temperaments seen today.