The larger the aperture opening (smaller number) the less depth of field you have. So when you see those great portraits with just the person in focus and the background blurred, that is done by controlling the aperture. When you see landscape photographs with the whole scene amazingly sharp, that is also done by choosing the appropriate aperture.
There are two other factors that effects depth of field. The focal length of your lens, and how close you are to the subject. A telephoto lens can be used to reduce the depth of field. You can also decrease the distance from the subject to reduce the depth of field. Conversely, if you use a wide angle lens or move farther away you can increase the depth of field. Shooting a landscape photograph at an aperture of 2.8 can increase the light while still giving you extreme depth of field if your focus point is far away.
Whatever the depth of field based on your equipment and settings, two thirds of the area in focus will be behind or beyond the point of focus, and one third of the area that is in focus will be in front of the focal point. This is an important point to remember when composing a photograph. You don’t always want to focus on the obvious subject when composing a photograph, otherwise you may have important areas that end up out of focus. Sometimes you will have to just choose an imaginary point partway into the photograph as your focal point in order to achieve the proper focus.
You can see my fine art photographs here.