Most dual-cam equipped smartphones offer a ‘fake bokeh’ feature. Thanks to the slightly offset position of their two lenses, cameras in devices like the Apple iPhone 7 Plus, Huawei P9 or LG G5, can distinguish between objects in the foreground and background of an image. By applying digital blur to the latter they can simulate effects of shallow depth-of-field you would typically achieve with a DSLR and fast lens.
If your phone just has one camera, there are still a few pure software solutions out there to achieve the same effect. The Patch app for iOS is the latest and uses neural networking to identify the foreground subject in an image and isolate it from the background. If the scene is too complex for the algorithms to work automatically, there is also a manual selection tool that can be used to optimize the results. You can paint in areas that should be sharp, and remove areas that should be blurred. A zooming function allows for greater precision in this task.
Once the selection is finalized users can choose from 5 different blur strengths to generate the desired effect. Patch does not have any particular camera hardware requirements and therefore works with most iOS devices. If you want to try the app you can download a free version that will leave a watermark on your images from the Apple App Store. A $1 in-app purchase will get you an upgrade to the watermark-free version.