The best way to protect carpet from paint is to choose either a canvas drop cloth or a plastic drop cloth + painter's tape combo. Either of these options applied over your carpet before painting will keep the paint from splattering on any unwanted surfaces.