Find a subject in front of a background with depth. Take a close viewpoint and zoom in; you’ll need to be aware of the minimum focusing distance of your lens. Focus on the subject and take a single shot. Then, without changing the focal length, set the focus to infinity and take a second shot.
Taken on a Canon 5D Mk III (full frame), 1/400 @ f4.0, FL 105mm. The first image is zoomed to 105mm with the model heron in focus in the foreground and without changing the viewpoint I moved the lens to infinity focus and the heron becomes blurred with the grass and frost in background now in focus.