iCloud Photo Library is not a backup solution, it's a sync solution.
It can be used as a backup but I don't recommend it. There's other solutions, like Dropbox or BackBlaze, that can serve as an offsite backup (using the 3-2-1 backup strategy).
When you use iCloud for photos, all the photos will be synced to each device signed-in with that iCloud account. Deleting a photo/video on any of those devices will also delete it from all the other devices when they re-sync. See this Apple Support site for more info.
iCloud Photo Library uses your iCloud storage to keep all of your photos and videos up to date across your devices. You can make more space in iCloud when you delete photos and videos that you no longer need from the Photos app on any of your devices.
You can also choose to save space on your device when you turn on Optimize device Storage in Settings. With Optimize Storage on, Photos will automatically free up space when you need it by replacing original photos and videos with device-sized versions. All of your original, full-resolution photos and videos are safe in iCloud and you can download them at any time. Learn more about managing your photo and video storage.