It keeps a low res version in the photos app on your phone. It decides what photos to keep the full size version. For me, this seems to mean recently taken photos, photos recalled frequently, and favorited photos. I have about 450 GB total in the cloud, but on device storage is only taking up ~3 GB.Still genuinely interested in the answer to this.
All your photos stored in cloud, download one to edit / share etc so it’s on your phone.
How does it go back ‘into the cloud’ without deleting it off your device hence deleting it from the cloud I assume?
I was initially hesitant to press the "optimize" button, but I must say when I did, I've never looked back. Very seamless operation (at least for me). Photos usually download almost instantaneously, and videos may only take a few seconds.
So, in short, the full sized photo is on device initially, and then the device/software determines what is most efficient to keep local after upload. Deletion from phone manually would mean (eventual) deletion from iCloud.
I understand this might not appeal to all, but it has worked great for me.