If your images are a bit soft, a bit blurry or a bit out of focus, it's going to be one of only 3 reasons causing the problem - an autofocus issue, a depth of field issue, or a shutter speed issue. Try these troubleshooting steps before you take your camera to be looked at, if you think you have a sharpness problem.
1. Getting focus right
If you are using autofocus, your camera looks for contrast in your image to fix the focus on. It prioritises things closest to the camera. And if you have face recognition software, it chooses to make faces in focus above all.
If your camera is on factory settings, it will take readings from the whole frame and decide where to fix the focus. It usually gets it right, but if you wanted to focus on something in the background, something small in the frame, or on something that doesn't have much contrast (something all one colour for example), it might get it wrong.
a) Use manual focus
The most accurate way to get your focus correct is to switch from auto focus to manual focus. Look on the lens for a button that says "AF/MF" and switch it to MF, then you will be able to turn the barrel of the lens to change the focus. Don't forget to switch it back.
b) Change your focus point
Instead of using auto focus to take a reading from the whole frame, you can change which focus point the camera uses - you can pick just a single point in the frame and tell the camera only to focus there. Find your manual (or download it), and find out how to change your focus points.
c) Use focus-recompose
Once you can activate a single focus point you can use the focus-recompose method for quicker focussing. Half-press the shutter button to achieve focus on the single focus point, and then - still with the shutter button half-pressed - move the camera to recompose your image how you want it. Press the shutter button all the way to take the photo. For as long as you keep the shutter button half-pressed, the camera will hold the focus on the first place you focussed.
2. Understanding depth of field
If you are using a wide aperture, the part of the image that is in sharp focus (the depth of field) will be small. Don't forget that the depth of field starts from the point you focus on, and extends in front of and behind that point - so if you have focussed on something other than your subject by mistake, then your depth of field will also be off.
3. The problem of camera shake
Can you tell the difference between an out of focus shot, and one with camera shake? Your focus might be absolutely fine, but your shutter speed might be too slow for the lighting conditions, resulting in a shot where the image is smeared rather than blurred. If this happens, adjust your shutter speed to be faster, or use your ISO to compensate for the lack of light.
This shot has camera shake:
Whereas this one is simply out of focus:
If you zoom in to 100% magnification, you can compare the difference. Camera shake on the left, out of focus on the right:
If you need help understanding the basics of shutter speed, aperture and depth of field, join my free, online beginner's photography workshop, A Year With My Camera here and get started today:
If you've checked everything above and your images are still consistently out of focus in different situations, it might be that your lens is calibrated wrongly. This is where it has been incorrectly set up and isn't focussing where it should when you are using auto focus. You can take your kit to a camera shop to be tested, or you can have a go at recalibrating it yourself. Look online for "how to calibrate a lens" posts. This is a good start: How To Calibrate Your Lens. (I've never calibrated my lenses, even though this post says I should. I've not noticed any autofocus errors.)
You might also enjoy this more intermediate post which includes some off-camera techniques for sharper images: 7 Guaranteed Methods For Sharper Images