You need a good reference on masking. Photoshop has may tools for making selections. The magic wand tool is not always the best tool to use. For some thing the magic wand tool is great fast and easy. For many images there are other tools that would be better than the magic wand for doing what you want to do.
To separate something from the background requires contrast between the two. This contrast is not always immediately visible and sometimes there will be none in which case you will need to fudge the separation.
The Magic Wand is a color-based selection tool. After you select it, look up at the Options bar and check the Tolerance value (which defaults to 32). A lower tolerance value will make the tool less tolerant of a color change, and that's what you are looking for. Each photos is different: be ready to pick Edit > Undo until you get the right tolerance value. Then Shift click with the wand to add additional pixels to your selection.