No filters or photo-editing. It just comes down to the aperture-setting (Pete mentioned it as well): if the lens is opened as wide as possible, the depth of focus is smallest (so only a small part of the image is in focus). The photo with the plank was shot at aperture F2 (shutter 1/8000); the picture with the perfume bottle: F2.8 and 1/1000. If I would have chosen F7.1 for instance, the whole perfume bottle would have been sharp on the picture and a lot more of the plank would as well.
I use a program setting on my camera which automatically adjusts the shutter-speed while I manually set the aperture. Basically with that I can influence how much of the picture is sharp or out of focus. This kind of setting can be done with most cameras.
Hope that helps.