While any color can serve you well, three ways have emerged that can help you:
You simply have a white background and try to illuminate that so much, that the RGB value for this reaches 255/255/255 which means it is pure white.
Pro: Very clean image
Contra: Need to be careful not to overblow the background so much that the edges of the subject become blown out as well, if you have rim light on the subject, the edges are not that clearly defined anymore.
Chromagreen or Chromablue background
Similar with other chances and problems. As long as the color does not appear in your subject, it makes the whole process even easier, as you don't need to exactly overblow the background and can have a variety of shades in here before it ceases to work.
Pro: Easier to pull off, does not need exact or even lighting
Contra: If there is not enough space between the subject and the background, you might end up with the chroma color shining onto your subject which pollutes the color on the edges of your subject. You can see that sometimes in older films when the telltale blueish rim spoils the special effects.
Variant: Grey Background
This one is a bit more work but with some advantage. If you want to insert a background texture anyways, a grey background lets you keep the natural shadows. You basically shoot the image with background, insert the final background and then blend the texture over your subject, masking out the subject itself. While this is technically not the same as killing the background, it might be an alternative in certain situations.