Just restart your device to exit safe mode. But if there's an app/file that is causing trouble to your phone, you must remove the app/file or your phone will be back to safe mode every time.