This is called "spill". It happens when the background color reflects onto the subject. To prevent this, make sure your subject is not too close to the background and use good lighting.