My iPhone randomly shuts off?

I have an iPhone 6 and lately it has been resetting on its own. I will just be texting someone or on Instagram or something like that and it will just go to the white screen with the apple sign on it as if my phone is turning on. It stays like that for about ten seconds and then goes to the lock screen. Why is this happening and is it a problem? My iPad mini also does this.

This happens to me too gets me mad simple just update to the latest software.

Mine does as well. If you have a local Apple Store nearby take it there. Also try resetting your network settings and soft resets (holding home button in and power button in at same time until your device shuts off) The Apple Store gave me a new iPad and I have AppleCare. Hope this helped

Call Apple