Usually, you can turn off safe mode by restarting your device or from the notifications panel. Alternatively, you can try clearing the app data or cache if an app is responsible, or, as a last resort, factory resetting your device. You should back up your data if you’re going to perform a factory reset.