Hello Omar_gak,
Thank you for reaching out to Apple Support Communities, and we'll be happy to help in any way we can. We understand you have questions about iCloud Photos. This article goes over iCloud Photos and how it works: Set up and use iCloud Photos
"What happens when you edit or delete photos
When you edit or delete photos or videos, the changes are reflected across all of your devices.
Edits show up on all of your devices
When you make edits in the Photos app on your iPhone, iPad, or iPod touch or on your Mac, the photo automatically updates across all your devices, including your Apple TV. So when you crop or enhance a photo from your iPhone, you see the changes when you access your library from your Mac. Your original photos and videos are stored in iCloud and you can go back to them at any time, and revert any changes you made.
Photos delete from all of your devices
When you delete photos and videos on one device, they're deleted everywhere that you use iCloud Photos. If you delete something accidentally, you can recovery it in the Recently Deleted folder for 30 days. After that, it's deleted permanently. "
As iCloud is a syncing service, the photos would also be stored on your device, but you can choose to optimize your storage for iCloud Photos to save space as described here: Manage your photo and video storage
We hope this helps.
Cheers!