Thermochromic inks conjure their magic in different ways. Currently, there are two major categories of these inks: thermochromatic liquid crystals (TLCs) and leuco dyes.
Liquid crystals are exactly what their name indicates -- a substance that has many properties of a liquid crossed with structural elements inherent to crystals. Peer through a microscope at a liquid crystal and you'll see a fluid that exhibits evident textures.
Liquid crystals are dynamic. Their properties change depending on environmental conditions; TLCs exhibit different colors in response to temperature changes. At lower temperatures, these liquid crystals are mostly in a solid, crystalline form. In this low temperature state, TLCs may not reflect much light at all, thus, appearing black.
Apply warmth and increase it bit by bit, though, and you'll see the TLCs shift from black to just about every color of the rainbow. This happens because as temperature rises, spacing between the crystals changes, and as a result, they reflect light differently.
You can't just plop TLCs onto a product to make it change colors. The liquid crystals must first be microencapsulated into billions of tiny capsules that are just a few microns in size. This encapsulation process offers some protection for the TLCs and maintains their thermochromic properties.
Then, these capsules are blended with other materials and used in products, such as room thermometers. Hang the thermometer in a bedroom and you'll see a rapid change in color that indicates an accurate temperature.
Temperature accuracy is a strong suit for TLCs. Their color consistency means they can indicate heat levels to within a few degrees. However, TLCs are a touchy technology. Their performance can suffer with repeated exposure to UV light, water and chemicals. What's more, they require specialized equipment for proper integration into various products, and that equipment (as well as the TLCs themselves) often adds significant expense to a manufacturer's production costs.
Leuco dyes and inks, though, are a different story.