To upload photos and pictures from an iPhone to iCloud, you can either activate iCloud Photo Library, which will upload all the content of your Photo app on the cloud and keep it updated across all your devices and the net, or, alternatively (and maybe more conveniently), you can activate iCloud Photo Sharing, that allows you to create photo albums online and, if you want to, share them with your friends and family through a link; in addition, you have also the possibility to create My photo stream, that creates automatically an album online with all your most recent photos. All of these options can be managed though their dedicated section in Settings-iCloud (or alternatively, Settings- Photo).
Here are some Apple Support guides:
My Photo Stream
https://support.apple.com/en-in/HT201317
iCloud Photo Sharing
https://support.apple.com/en-us/HT201077