Directly from Apple:
"Photos and videos are stored in your account for 30 days. To download your photos and videos on your iOS device, go to Settings > [your name] > iCloud > Photos and select Download and Keep Originals. On your Mac, open Photos, choose Photos > Preferences, then select Download Originals to this Mac. You can also select the photos and videos that you want to download from iCloud.com."