How are HDRIs used for the foreground? I was looking at HDRI Haven and some of the example renders appear to use the HDRI as part of the foreground.  

For example this hdri:
https://hdrihaven.com/hdri/?h=old_bus_depot

In the example render below they used the part of the hdri in the blue square.  How is this achieved?
Use the HDR as environment texture.
Just line up the camera so that it sees that part of the environment.

Or rotate the environment image until you see the section you are looking for.
How do I rotate an environment texture?
To have shadows of the object create a plane and use it as shadow catcher.