Wild carrots probably evolved with the other flowering plants about 360 million years ago. Like apples, carrots are native to Central Asia. That's why horses, which also come from Central Asia, like both apples and carrots so much.
With wild carrots, the roots are white, small and skinny, so you'd have to pick a lot of wild carrots to get enough to eat. Doctors used carrot seeds and roots as medicine, on the theory that foods that taste bad must be good for you.
Around 800 AD, people in Central Asia managed to develop a new kind of carrot—a purple carrot—that attracted more interest from international traders. Then, in the late 1500s, food scientists in the Netherlands cultivated large, straight, sweet, red carrots like the ones we eat today. But people still mostly fed carrots to horses, donkeys and pigs, and didn't eat them themselves. In the 1600s, people in China used carrots as medicine, but they also ate carrots boiled in soup. The red color was popular for Chinese New Year celebrations.
But carrots got their biggest boost during the two world wars, when food shortages forced people to eat them, and governments told everyone how healthy carrots were. Today, cooler countries grow most of the world's carrots. Machines do most of the planting and picking, and carrots are easy to store and ship, so they are cheap almost everywhere.