Originally Posted by
Intense Soul What I exactly mean is, if I'm opening an email or browsing apple website or any website, or chatting with someone on iMessage sometimes the screen displays Apple logo all of a sudden and gets locked by itself. It's like annoying in middle of the work.
What do you mean by "getting locked"? Are you saying that it's rebooting to your lockscreen where you have to enter your passcode?
If that's the case, go to Settings > General > Reset > Erase All Content and Settings. This will bring your iPhone back to factory defaults. I recommend setting it up as a new device to minimize any software problems but you can try restoring from a iCloud or iTunes backup as well.