Updates are still a huge pain point for many Android OEMs, but Google's usually been okay with them. Historically, devices with the Nexus nameplate have received around two years' worth of updates; for instance, the LG-made Nexus 5, which was released in late 2013, is stuck (officially) on Marshmallow, which was released in late 2015. That trend seems to be continuing with the Pixel phones.
According to Google's "Check and update your Android version" support page for Nexus devices (yes, we know Pixels aren't Nexuses), the Pixel and Pixel XL are both guaranteed Android version updates until October 2018, and security patches until October 2019 (or 18 months from when the last Pixel phone is sold on the Google Store, whichever comes later). Of course, it's possible that Google will choose to send major updates to the Pixel phones after that October 2018 date, but the company won't be obligated to.
However, this being a Google phone with an officially unlockable bootloader (excluding the Verizon models), it'll almost certainly receive developer support past then. For instance, the Nexus 5 has had 7.0 Nougat ROMs available for a few months now. It is worth noting that due to the Pixels' higher prices (they start at $649), community support may not be as widespread as it is for the $349 Nexus 5 in the future.