What to do when PS4 turns off itself?

I really don't know what's going on. Few hours ago, I was playing GTA V and my PS4 shut down itself. This is the first time it happened. I have bought the lauch day bundle from Amazon on Wednesday and it had worked fine for some days but now, it's showing problem. I have checked the HDMI cable, hard drive and it isn't overheating either. Please suggest me some fix for this problem.
