What happens if I cancel/downgrade my iCloud storage plan? I have more media that can possibly be stored on my iPhone, so I assume that most of it is stored in iCloud and downloaded when required (when I view it). 

What happens if I cancel/downgrade my iCloud storage plan?

How do they decide what media is going to be deleted, so that the amount falls within the free plan? 

Is there a time period where I can cancel and then sign back up and it'll be as if nothing has happened?
You will be able to access and clean up your iCloud storage, but some services will be unavailable for you.


  If you downgrade your storage plan and your content exceeds the
  storage you have available, new photos and videos won't upload to
  iCloud Photo Library and your devices stop backing up to iCloud.
  iCloud Drive and the other apps that you use with iCloud won’t update
  across your devices. You can't send or receive messages with your
  iCloud email address. Learn how to manage your storage by deleting
  backups, documents, photos, and email messages that you don't need
  anymore. If you cancel your plan or you don't renew it, you'll
  automatically go back to 5GB of free storage.


https://support.apple.com/en-us/HT201318