Open an image
Cut your subject out of the background. There are several ways to do this but in this case i used the Magic Wand tool (W). I inversed the selection and Select and Mask (under Select in the menu) to make the edges perfect.
With the selection active click on the mask icon. Now have we cut out the subject.
Now you can add a new Solid Color Adjustment Layer. Pick a color and you have a different background.