In photography, isolating your subject(s) is essential, and a sign of a quality photo. There are different ways to do that, such as using shallow depth of field (blurry background), flash or separation by contrast (white subject to the dark background and vice versa)
A straightforward thing you can also do that is to look for clean backgrounds. Try to have as little clutter in the photo as possible. Clutter is distracting, and distractions make our eyes zig-zag around the picture. The viewer is essentially confused about where to look at.
A simple background creates a pattern, and the subject is breaking that pattern, which in turn catches our attention. The human mind is very good at recognizing patterns, and if there’s something different, we notice it immediately.
This is why it is somewhat pleasing for the eyes to look at clean, simple photos. Clutter confuses us. We’re looking for a pattern, but we can’t find any. It’s mostly noise.
The photo below is not a good photo, mainly because of all the clutter. There’s the bus, other people, all kinds of signs which make the eyes of the viewer zig-zag around. Even though we know that the subject is the man in the suit, we can’t help but look at all these other things.
The next photo is a bit better. I realized that there were too many distractions, so I artificially got rid of them. I did that by pushing the blacks quite hard. I could get away with it, because the train was bright, and as you can see, it still stands out very well while everything else is quite dark.
This picture is more pleasing to look at because our eyes don’t wander around. Sure, there are some buildings, but they are not distracting.
A simple background doesn’t necessarily mean it has to be a white wallpaper or a flat brick wall. The main point is that it should be simple so that your subject “pops” out.
There’s no single right way to separate your subject from the background, but keep in mind that it’s important and that there are few ways to achieve that result.