Google Pixel and Pixel XL use USB Type-C and USB Power Delivery (USB-PD) to charge the battery. You can get up to 7 hours of battery life in just 15 minutes of charging the phone. The battery use obviously varies based on how you use your device, but Google tested it using the included USB Type-C 18W charger.
If this is the first time you hear about the terms USB Type-C and USB-PD, let me explain a bit more about these terms. USB Type-C is the latest standard that boasts faster data transfer speeds up to 10Gbps, USB 3.1 support, supports additional capabilities such as Alternate Mode, it's smaller than previous connectors, it's reversible (has same connectors on both sides) and it's compatible with USB-PD specifications.
USB Power Delivery allows parallel data transfer and power transfer without interference because it's bi-directional, so the device can send or receive power from an external device and do that while dynamically optimizing itself to the device current battery qualifications. It also expands USB to deliver up to 100W (20V, 5A) of power. This allows devices who operate with this new specification to maintain maximum battery life and performance, as well as be more energy efficient and offer faster battery charge times for its users.
This is why Google Pixel and Pixel XL has such an efficient battery charging capability. The USB Type-C connector itself with the cable alone doesn't grant all those benefits by default, the mobile phone itself has to support the USB-PD.
I was among those who thought that Google Pixel phones utilize Qualcomm's Quick Charge 3.0 because the Qualcomm Snapdragon 812 processor that comes with the both Pixel phones does support it, but the fast charging is provided due to the USB Type-C and USB-PD. This is the first time a Google phone (inc. the co-branded ones like the Nexus phones) that uses these features. I did read on Benson Leung Google+ page (an engineer working at Google), that Google Pixel and Pixel XL do not support DP alternate mode, for those of you who wondered.
Here's a video by Microchip Technology that puts more light on these technologies:
I am not an expert in this field, but I am happy to know that both Pixel phones have rapid battery charging option. I can't recall how many times I forgot to charge my battery and stuck with less than 5% and how many times the battery died on me the moment I need it the most. You can, if you want, buy a portable battery charger, but with fast charging, you don't need to worry about getting stuck without power because you know that within a few minutes you can have battery charge that can last even for the whole day.