Well I don't know exactly from one cm to infinity
But if you want more in focus in your picture. You need to adjust the settings. It's the aperture or the f-number/f stop that controls depth of field.
If you want a large depth of field, you increase this number. So using an aperture of f20 for example wil give you a big depth of field. And the oposite way around too.
A downside to this is that your lens will collect less light and you wil need a longer exposure to gather enough light. See the aperture is actually an iris that is build in to the lens. If u use a high f-stop like f20, the opening of the iris wil be small. If you use a low f-stop like f 3.5, wich is the lowest for your lens, the opening wil be bigger. You wil gather more light. You will have a shallow depth of field. And be able to use a faster shutter speed.
If you wish to control the apperture on your camera and let the camera decide the rest of the settings for you, set your mode dial to AV mode. This stands for aperture value. Then u can turn the control wheel to adjust the aperture.
Also I should note that the distance to the subject mathers to. So if you are shooting a landschap it wil be easier to get everything in focus than when you are shooting a person in front of a large landscape.
If you want more information on this you can always google it, and to al the other members here please correct me if I said something wrong or left something out