A carpet protector can prevent both water-based and oil-based stains from penetrating carpet, making stains less permanent and more easily removed. Carpet protectors work by creating a barrier against stains, spills and dirt. They protect a carpet's appearance and preserve the color.