Photoshop's Displace filter performs pixel shifts within your imagery, based upon the pixel data within a source image. The results are controlled by horizontal and vertical measurements. You can shift the contents of a layer to match the contour of the surface below, simply by using a greyscale copy of your background image as a map. One helpful secret to successful displacement is to be subtle when shifting pixels; if you enter too great a measurement, your artwork will start to look far from realistic.
If you want your displaced layer to really look like it belongs on the underlying background, you'll need to stack up layers with varying Blending Modes. This allows you to blend your displaced art with details of the underling surface, resulting in an authentic look.