The key to getting rid of distracting objects in your photographs is to be aware of them in the first place. Only then can you work to eliminate of them before tripping the shutter.
This means carefully examining the entire viewfinder, especially near the edges and the corners. It also means looking for unwanted items in the foreground and background. It's all too easy to get so focused on your main subject (no pun intended) that you lose sight of ugliness elsewhere in the frame. It's easiest to do this careful evaluation of the scene if your camera is mounted on a tripod, but even if you are holding your camera in your hands you should go through this check of the entire image.
Here's an example of an image I shot without attending to the edges of the frame. The branch intruding from the left ruins the shot. (This particular image could be saved in Photoshop, depending on one's ethics concerning digital manipulation, but it's always best to strive for your best possible photo at the time of exposure to give you the best starting point for later processing. Photoshop, if used at all, should be the last resort toward perfecting an image, not the first.)
If you find unwanted visual elements in the frame, the best solution is to move your camera position to move the distraction out of the frame. Don't forget that you can shoot from a lower angle or from a higher position as well as moving left or right. Moving closer might help, too.
Sometimes you can physically remove the offending object, as long as you don't damage anything. A leaf in the wrong place can be picked up and tossed aside. A downed branch can be dragged away. Living objects can be temporarily tied out of the way with a string, clothespin, or a McClamp.
Unwanted objects that are closer or farther than your main subject are often hard to spot. You are always viewing the scene in the viewfinder at the lens' widest aperture, hence at the shallowest depth of field. The foreground and background are at their blurriest. When you shoot with the lens stopped down, things that were too fuzzy to notice when you scanned the viewfinder may make a surprising appearance in your actual photograph. The thing to do here is to check the foreground and background at the actual shooting aperture.
The best way to do this is with the depth of field preview button, if your camera has one. Pressing this button temporarily stops the lens down to the shooting aperture so you can see exactly what the film will record. In the absence of a depth of field preview feature, on some SLR cameras you can start to detach the lens don't take it all the way off, just turn it enough to break the camera-to-lens connections. The lens then stops down to the shooting aperture, and you've duplicated the effect of a depth of field preview button. In a pinch, you can just scan the scene from near to far by focusing the lens through its range as you watch the viewfinder: you'll find what's in the foreground and background.
Once you've identified these foreground and background distractions, what is to be done? Once again, it's best to move the camera position to eliminate them entirely. For something in the background, you can sometimes move so that your main subject hides the background object. (You might be amazed to learn what is lurking behind the subject in photographs you admire!) If moving camera position can't help, try shooting at a very narrow depth of field to blur the distractions as much as possible.
Noticing distracting elements in the first place, and then working to eliminate them, will improve your photography dramatically.
Timothy Edberg / 6511 Homestake Dr. South / Bowie, MD
(301) 809-5857 / 1-877-471-6414 (toll-free)