This in not enough information to go on, but it has to be some sort of masking that you are talking about. Masks choose which area are hidden or revealed of a layer. There are different types of masks though, so there are several options. What you describe sounds like it might be a clipping mask, which uses the contents of another layer to determine what is visible in the layer you are working with. But you can't reverse it, like you mention, so that sounds more like a traditional pixel mask, which can be inverted to reveal what was once hidden. This document has a lot of information on the subject: https://helpx.adobe.com/photoshop/using/masking-layers.html
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.