Do you have Live Focus mode selected in the camera? In that mode, the camera keeps tring to focus on what it determines to be primary object in the picture and could result in the effect you noted.
There should be a list of modes running across the top of the screen which you can access by swiping agross the screen. If these options do not appear, try opening the settings option from within the camera app, scroll down and select Shooting Methods. Here you can enable/disable the options for each of the cameras.
You could also scroll to the bottom of the settings menu screen and select Reset Settings.