They need to be on the same iCloud account and have iCloud Photos turned on in Settings Photos. I you have a sigifican number of photos, you’ll probably have to spring for some extra space in iCloud. You can get 5GB for about $1 a month, which should be enough for most people.
Once you tunr iCloud Photos on (both devices), they will start to sync. Depending on how many photos you have this could take a few days. Your devices will do most of the work when they are plugged into power and not being used. You can see the status at the bottom of the screen in the Photos view.
Photo albums synced using iTunes on a computer will not be included in the iCloud sync/library. These albums can only by managed using iTunes on the computer. If you have photos on the computer that you want on your iOS devices, and too sync, then you’ll have to import them to the library of one of the iOS devices.