Apple's iCloud comes with 5GB of free storage. You can upgrade that to 20GB for $1 a month, or $4/month for 200GB. Depending on the size of your iPhoto library, one of those tiers might be perfect for you.
Once you have paid for the tier you need, you can indeed upload your entire iPhoto library to iCloud and have it accessible from any iOS or Mac (or Windows) device. Obviously, that initial upload may take quite a while. This is *not* intended as your sole library, it's intended as a highly-accessible backup. You still should have a local iPhoto library, but you can store that on an external drive if its too large for your boot drive.
I think most people use iCloud Photo Library as a place to store their latest pictures taken on their various devices, and move the best ones to their permanent local iPhoto library. But certainly iCloud Photo Library can be a full cloud backup of your entire photo library (up to 1TB, which gets kinda pricey) if you want.