One of the challenges of close-up and macro photography is that depth of field is so shallow. There is nothing we can do to change the physics of how optics work – the closer you are to a subject, the shallower the depth of field becomes.
Yet, simply stopping your lens down to the smallest f-stop or aperture isn't necessarily the answer. That can result in a distracting background even if it is not in focus, plus you can have sharpness issues due to diffraction.
One solution is focus stacking where you take a series of photos at different focus points and put the images together in the computer (Google focus stacking if you want to learn more). It works, and I have used it occasionally, but it is a bit of a nuisance if you are out responding to nature because the subject cannot be moving, you have to take multiple photos for one photo (the time needed for that can be a problem with certain subjects), and you have to put all the photos together in the computer. It is too much trouble for me most of the time.
Often what I do is shoot at a moderate to wide f-stop (e.g., f/8 to f/2.8) to dull the background, then I pay attention to the angle of my camera to the subject. Your camera/lens have a plane of focus that is parallel to the back of your camera (tilt-shift lenses change this variable, but they are a bit exotic, expensive and big for most nature photographers). So for example if you are focused at four inches from your subject, there is a plane that is sharp at that distance, a plane that is parallel to the back of your camera.
An example will help. Think about photographing a group of flowers such as these:
Imagine holding a small sheet of thin but rigid plastic at the back of your camera and in front of your camera at the distance you are focused. That sheet represents the plane of focus and it is parallel to the back of your camera.
Anything that this sheet of plastic touches will be in focus, even if you shoot wide open (such as f/8). Stop your lens down and that sheet gets thicker, but is still parallel to the back of your camera.
Now consider what happens when you change your angle to the subject. Now that plane of focus also changes relative to the subject (it is constant in relation to the camera).
This can be used both to get more things in focus (when the back of the camera is parallel to the subject matter) or less in focus (when the back of the camera is not parallel to the subject matter). Here are some examples. First the camera back has been carefully matched to the subject plane:
Next, the plane of the camera has been deliberately placed at an angle to the plane of the subject in order to create emphasis from a contrast of sharpness.
I am doing a three-day close-up and macro class at the Palm Beach Photographic Centre in March. You can see more about it here.
My new children's nature photo book, Nature's Jobs, is filled with close-ups and macro shots that use these ideas, too.