Although they feel solid, your nails are quite porous, which makes them liable to absorb the pigments in your polish. The iron oxides used in red and pink pigments are the most aggressive agents of yellowing—it’s basically like the polish is rusting your nail, since iron oxide technically is rust. Fortunately, it’s a purely cosmetic (and temporary) problem. But if the discoloration bothers you, prevent it by taking your polish off more frequently and adding lighter colors to your rotation.
MORE: What to Do About Yellowed Nails