The technique you're talking about is called compositing. It can be both time consuming and technically challenging and require a software program like Adobe Photoshop or something equivalent.
there are a couple of alternatives that might make sense.
One is to retake the shot with a much deeper depth of field. It might be a lot faster and give you better quality to do this than to try to patch the images together by hind.
It might be possible to merge the images together using a tool that does focus stacking processing, which finds the sharp parts of each image and stacks them together to combine all of the sharp parts. Depending on how you took the images this might or might not work because it requires a stable camera and a series of shots that move the sharp part of the depth of field across the subject (see http://en.wikipedia.org/wiki/Focus_stacking for more)
Chances are, if you aren't a bit of a photoshop whiz, an attempt to composite something like this will end up disappointing with the result. It's rarely easy (or possible) to take flawed photographs and patch them together in a way that doesn't look patched together.