Depth of field is the range of distances in a photograph that appears acceptably sharp. A shallow depth of field can isolate a subject against a soft background. A deep depth of field can keep much more of a scene sharp.
Aperture matters
A wider aperture such as f/1.8 or f/2.8 usually creates shallower depth of field than f/8 when the other conditions stay the same.
Subject distance matters
Moving closer to the subject reduces depth of field. This is why close-up photographs can have extremely thin focus even at moderate apertures.
Background distance matters
A background that is far behind the subject usually blurs more than a background directly behind the subject.
Focal length changes the look
Longer focal lengths can make it easier to create strong background separation because photographers often stand farther back and frame more tightly.
Sensor size affects the practical setup
Larger sensors often make shallow depth of field easier to achieve for the same framing and comparable aperture because they usually require a longer focal length or closer shooting distance to create the same composition.
Background blur is not only aperture
Buying the widest-aperture lens available is not the only way to create a soft background. Moving the subject farther from the background or changing your position can have a large effect without buying anything.