Depth of field means how much of the photo they want to have in focus. It gives more attention to your subject. Depth of field is controlled by the aperture. The more larger your aperture the shallower the depth of field so, a small portion of the image will be focused. Smaller aperture the deeper your depth of field. In order to have a depth of field you have to have the ability to change your aperture.
In a portrait photo a shallow depth of field is good to have the person’s face in focus. Its also good when you want to separate a object from the background especially when its busy. For a photo of landscape a deeper depth of field is better as it allows for everything to be in focus.