All depends on complexity of image, which software & version you're using and how skilled you are with it. But generally speaking, yes, removal of foreground elements is possible with masks in Photoshop CC. But it might take a while to get a perfect selection. Take your time and be patient. This video may help.
While you can "remove" the fence, there won't be anything "behind" it if it is on one layer. Instead of leaving a big white hole where the fence used to be, you'll want to use Content-aware fill and / or the Clone Stamp tool to replace the pixels where the fence is now with other parts of the image. These may be easy or complex, depending on the scene.
If you want us to look at it, please add a screen shot. Use the Insert Image button (mountain and sun) in the Reply window. If you need steps on using these tools, let us know.