As described above, your camera is probably set by default to choose where to focus in the frame.
This is the Automatic Focus Area Selection feature.
The feature works—but not all of the time.
For example, let’s say you're photographing a gathering in a living room.
The camera may focus on the bald head of the nearest person to the camera, rather than the entire group of people.
You may want to set the focusing area to the center of the frame.
Then, you can focus where you want to focus.
Once the focusing system is set that way, do the following.
1) Focus where you want to focus, and keep the shutter release partially depressed.
2) Recompose your photograph if needed.
3) Press the shutter release all the way down.