As detailed in Apple's support article, you can disable iCloud Photo Library on your iOS device by tapping Settings > iCloud, and turning off "Photos".
Your photos will still remain in iCloud Photo Library but will be removed from your device.
It appears you have synced photos into your iPhone via iTunes. You can select folders from your computer and sync them to your iOS devices when connected (or via Wifi if you have that option checked).
iCloud Photo Library is letting you know you'll lose those synced albums on the phone.
To check which photos and / or videos, you can connect your iPhone to your computer , start iTunes up and go to the Photos section on your device menu:
as you can see, you can select different options to sync photos from your computer back to your iPhone
If you do not remember setting this up, or if it appears un checked, as in my screenshots, you are probably not connected to the original iTunes (or iTunes library) that set this up.
Checking which are the images that will be lost directly on your phone is a bit more tricky, as the only obvious sign is that you cannot delete the album nor the images directly from it. So, you could go checking albums until you find one that does not allows you to delete pictures –although this will also be the case with iCloud Shared albums you joined. The good news is that you probably have a copy of those pictures elsewhere, unless you've lost the computer which synced them in the first place.
Turning My Photo Stream off will stop it from receiving pictures made with other iOS devices or saved on iPhoto / Photos app configured with the service. It will not save space if you don't have other devices behaving in that fashion. It will also stop it to upload them to those other devices, if this is part of your archiving system, keep that in mind.
Turning iCloud Photo Library on will upload a copy of all the pictures taken or saved (but not synced via iTunes) on your iPhone to iCloud, and, depending on the configuration, it will try to save space on your device by erasing the original on your iPhone afterwards and leaving a copy with lower resolution. If this setting is not activated, no space will be saved. Erasing the pictures on your iOS device with iCloud Photo Library on will permanently erase the pictures on all synced devices and on iCloud, so be sure to have a backup.
Best Answer
You can't, is the short answer. iCloud Photo Library is a two-way street - if you want to be able to upload to it, it has to be turned on, which means photos will also be synced to the device.
You can enable Optimize Device Storage under Settings > Photos, but that will still use some storage on the device. There is no way to bring that to zero without disabling iCloud Photo Library on the device entirely.