'Scarlet' was originally a fabric—not a colour. In the middle-ages it was a high-quality cloth brought to Medieval Europe from Central Asia. It was also very expensive; at its highest quality, it could cost about 4 times the price of regular cloth. Often it was dyed blue, black, brown, green, or—if you had enough money—you could dye your expensive fabric the most expensive colour: red.
Our English word "crimson" comes from the Sanskrit name for the kermes insect: krim-dja. In order to make red dye, you needed to take a trip to the Mediterranean, find some oak trees, scrape off about 70,000 pregnant kermes insects (a small bug about the size of a child's pinky nail), give them a nice vinegar bath to kill them, then crush them to release a crimson colour—all to make just a single ounce of dye. It was a huge business; when the Romans ruled what is modern-day Spain, about half of the area's taxes where paid with the little insects. But then there was a new discovery; halfway around the world, while searching for silver and gold, explorers discovered an even more potent bug.
When the conquistadors invaded Meso-America in the 16th century, they came across the cochineal insect. It was a tiny, flat insect (often mistaken as a berry) related to the kermes, but it produced an even higher concentration of red. Technically a parasite, it survives in a white fuzz on the Opuntia cactus (aka: Prickly Pear or Nopal). After noticing how the locals harvested and made bright red pigments out of the bug, the conquistadors quickly took over the industry and exported the carmine dyes to Spain. They were a huge hit. Everyone in Europe and beyond wanted to get their hands on the amazing, new colour. The bug blood was used in fabric dyes, paints (though not very successfully as, like most reds, it tended to fade), painted on lips, used as rouge, and was considered a powerful healing agent. Spain's King Philip II took vinegar and crushed cochineal as a medicine. Cochineal was such an important industry for the Spanish Empire that they tightly controlled the secret of how they made it, resulting in a powerful monopoly. A young French spy named Nicolas Joseph Thiéry de Menonville even snuck into Spanish territory in an effort to learn how the red dye was made. He was made Royal Botanist for his effort, even though none of the Cochineal he sent back to his homeland survived.
The cochineal industry took a hard hit in the mid-1800s when synthetic colours were invented, essentially killing the cochineal industry in many communities. The newer, stronger synthetic reds, such as Alizarin Crimson, were less labor-intensive to produce, and soon beat out cochineal in the artist's paintbox. While we don't really use cochineal in our paints and clothing anymore, the industry has slowly grown back as a safe food-colouring alternative since Synthetic reds have been linked to cancer. What adds a sexy red to your lipstick and blush, and a jolly red to your candy and ham is probably made with dried insect. Red food that contains "no artificial colours" or "only natural colorants" will usually use cochineal, and some industries are required to list "cochineal" or "carmine" on the label to alert those with allergies. Vegans beware.