You need a tripod so that each image is taken in exactly the same place and for this example I needed a very still day so that the flowers didn't move in the wind. I use the manual setting on the camera so that all of the photographs have exactly the same exposure. Once set up you then need to take a number of shots focusing on different parts of the image (always use manual focus). In theory it's possible to stack many shots together but I've found 3 seems to work best.
This is the first image taken at ISO 800, f/29, 1/60th on a Nikon D700 with a sigma 150mm macro lens.
For the next image below I've carefully adjusted the focus to a part of the image further away.
... and then for the final photograph below I've repeated the process adjusting the focus point to the rain drops on the stem of the bluebells.
Then we need a program that will combine the 3 different photos for us. I've been very happy with Helicon Focus which is pretty cheap and available as a download. Using Helicon Focus I simply add the 3 photos into the program and let it render the images together. Often you will get some problems around the edge of the final image so I leave enough space in my original shots to crop this bit out. The completed image is below which has nearly all of the water drops pin sharp and would be equivalent to an aperture of ... well who knows ... but I'd guess around f/100 which is impossible on current lenses.
For more ramblings on macro techniques have a look here.