How to setup DOF to blur near and far objects

Hi, I know this is a really old topic- but could you explain how to do this for the background and foreground? I made my own topic for more details but I’m still a bit of beginner so I would appreciate any help! :sob: