Most often, when the background is in focus, and not the center object, it's because the center object is too close. The camera can't focus in such a short distance, so it chooses the next best thing.... the background. So try taking pics from farther away so the flower is within the camera's focal range. I've also found that if the subject jiggles too much, a camera won't focus on it. The other thing is some cameras only go into macro mode at certain settings, like wide angle (as opposed to telephoto), or won't do it at all in portrait or scenery modes, etc. Unfortunately, you have to have the patience to read your manual!
Joe's tapping feature is available only on some cameras. Most(?) "real" cameras do not have touch screens.