How to remove icloud from my iphone 5 but keep all my photos and videos?

It says i have 30 days to recover them, but from where?

Go to the iCloud website and use your Apple login details to access your account.

You can then download and save your data to another device. Alternatively set up a paid subscription to iCloud and your data remains safely stored as long as you continue paying. Paid subscriptions allow greater storage limits than the free iCloud account you've been using. Free accounts are valid only as long as an Apple device remains linked to the account and that's why you've had the 30 days notice. After that your data is wiped from Apple's servers.

Download and save your important files, music, date on your Mac or Pc.