As tenmiles stated, post-process defocus correction is not a solution for lack of good focus. Getting good focus in camera is a critical aspect of good photography. That said, there are some solutions, and we all make mistakes sometimes, and it's reasonable to expect an option to recover when you make such a mistake.
While Photoshop CS6 has a basic deblur feature built in, there are some tools on the market that can help. One of the better ones is Topaz InFocus. Like other similar tools, this is by no means a real solution to badly defocused images. For moderately to highly defocused images, or if you have a thin DOF and your focal plane landed on the wrong point, there is nothing that will really solve your problem...not to a level of quality that would be acceptable for art, anyway (however these tools do offer a utilitarian deconvolution capability for non-artistic purposes with almost any level of defocus.)
Topaz InFocus, the deblur tool I've used most, is actually excellent with very small amounts of defocus, and quite good at fixing small to moderate defocus. If can produce entirely acceptable artistic results if you aren't trying to correct wildly incorrect defocus problems. If you push it too hard, you will start to notice various kinds of artifacts that, while the content that was blurred will start to show up, it really won't be of any quality that you could keep.
Topaz InFocus can also combat blur from shake or motion as well. It'll detect the direction of blurring and try to deconvolve it. Again, for smaller blur orders, you can correct these problems quite well. For higher order blur, your success will come with artifacts that may or may not be acceptable for artistic reasons. For utilitarian uses, you can deblur quite considerably and recover detail, such as heavily blurred text, to readable proportions.