Typically users of new cameras have focus problems and, in the way of human nature, it is the camera's fault or they think the lens is faulty.
The majority of normal focus problems are not a mechanical fault. They are an operator fault.
Another favourite is to assume a back- or front- focus fault with the lens or the camera. Regrettably this term has become fairly common due to panicky forum posts by paranoid and il-informed new owners.
First the rather silly tendency to pixel peep. At 1:1 or larger magnifications ( which are utterly insane, by the way ), you are effectively looking at a print several feet high and wide. Now no-one usually prints that size, so the first focus issue is in fact pixel peeping.
At 1:1 on a computer screen a 12 Mp image would be close to the height of a normal wall. Now you would not view an image printed that size from a foot away, but that is the equivalent of what you do when you pixel peep.
Always, always, always relate sharpness to the size you expect to view or print the whole image at. And remember to allow for viewing distance. People do not look at 16x12 prints from one inch away. You look at the whole image from a foot or more away. Think about that when deciding if an image is sharp enough or not.
Still Here ? OK.
The next main cause is a failure to control focus point coupled with a lack of understanding of depth of field.
Depth of field is limited. It is the range of distance in a shot that will be in-focus ( reasonably sharp ) and it is controlled largely by choice of aperture and the relative distance to the subject and the background.
If you take a portrait at f2.8 using a typical 24-70 lens you will likely to have as little as 2 inches of depth of field. You could have less.
That is remarkably little and even a slight movement by a subject will render them out of focus. A slight sway forward or back or even sideways can shift what is in-focus a lot.
This is compounded by the fact that people rely on the camera to either lock focus ( using autofocus ) or to confirm focus using a visual or audio cue.
This introduces a source of error. You now have to react to an event to take the shot, but that event is itself a reaction by the camera to an event.
And worse focus confirmation areas in a camera are NOT perfectly aligned in viewfinders. So you may think it is saying a point is in focus, but it may not be the point you think. More expensive professional cameras are better for this, but they are not perfect. Do not think that is a camera fault. It is simply a fact of life. Changing camera will not significantly alter this.
For this reason I normally advise people to use manual focus when making a critical shot. This removes the camera from the equation which reduces potential sources of error.
It also removes another related problem : focus point. If you use any form of autofocus the camera will be restricted to a very small number of areas on focus on. Many people fail to even make the camera use a specific focus area and let it select the one it wants. But even if you tell it which area to choose, this is not a fine control and you rely on that point being exactly what you want.
I also suggest people do one more thing when using manual focus : consult an optician. A relatively small eyesight issue can be critical in manual focus situations. If you explain to an optician your requirements he or she will advise you on the best approach. Mine, for example, suggested I always wear my glasses when I shoot ( I am long sighted ). This helped me a great deal and also means I do not use the diopter adjustment on the viewfinder.
Another aid to manual focus is to consider a split focus screen for your viewfinder. For people who have not experienced them ( they were common in film days ) these are a vast improvement on standard view-finders. It is a shame they are not offered even as an option for most DSLRs. Third parties do supply them ( often taken from old film cameras and re-engineered ! ).
People also think they need very low f-numbers ( like f2.8 or f1.4 ) to get a good background blur. In fact you can often get a perfectly acceptable blur using f4 or f5.6. A great deal depends on getting the subject as close as possible and putting the background as far away as possible.
Of course sometimes you may find a real mechanical ( or electronics ) exists. However these are not as common as posts on forums blaming them. So first eliminate the other potential issues.