the longer the focal length, at a given aperture and fixed distance away from object, the depth of field becomes thinner.
to use a kit lens, i.e. use it at 55mm, take an object near to you, the nearer, the better the background.
if you shoot the same object at 18mm, the background will be more in focus etc..
if the object is further from you, the background will also come into focus more, i.e object nearer to infinity..