Gradient question

I don’t really know how to describe this, but when you put a layer over the top of a picture where it goes from a color and instead of the gradient going to a different color it goes to a clear area. Does that make sense?

I mean a picture where you see it fade into the background. I assume this is achieved by putting a second layer on top of the picture that is the same color as the background and it fades to a clear opacity over the picture, thus giving the effect it fades into the background of the webpage.

or as pr said, you can put any layer underneath the one you want to fade, give it a layer mask and fill the mask with a black&white gradient; it will fade your top layer out