Does deleting iCloud photos affect them on devices?
Yes. This is a good way to clear out space in iCloud.They don't delete immediately, you can recover recently deleted files for a while, but they do disappear from connected devices and will eventually be deleted - any copies you export onto your computer (outside of the Photos app) will not be affected.  I back up older photos from the Photos app, by exporting them to a folder on my Mac, then removing them from iCloud, to recover space when my 5 GB of free storage gets full.