Most cameras give us the option of locking the focus before composing a photo. This is usually done by pressing the shutter button in half way, holding it in place while you compose and then pushing it in fully to take the photo.
Suppose that you wanted maximum control of your photograph and had set your camera to focus on the object in the centre of the frame, rather than focussing intelligently. If you were taking a photo of two people with a small gap between them the camera would focus through the gap on what ever was behind them. They would be out of focus and the background in focus. With focus lock you can point the camera at one of the people, push the button in half way as you compose the photo to include both of them and then push the button all the way in to take the photo.