If your files and photos do not exceed 5GB, then nothing happens. Your files remain as they are and you can access them normally.
If they exceed 5GB you have 28 days to either download what you want, or subscribe to your own icloud storage that can accommodate all the files. After 28 days, the storage is reduced to the default 5GB and anything that exceeds it is deleted.
See the section titled “If your family stops sharing storage or you leave Family Sharing” here: Share an iCloud storage plan with your family - Apple Support