Sometimes your IPhone gets stuck in recovery mode due to various reasons. This state is called iBoot in which all files and iOS are erased. The phone doesn’t works properly till a proper format is applied to solve this problem. To get your phone out of recovery mode iOS Data Recovery and switching to iTunes