The feature is available in the Call Screen tool. It screens unknown callers and ensures those it deems to be robocallers don't bother you. Call Screen stops them from making the phone ring, and because the screening takes place on your device, it won't use up extra data. You can switch on Call Screen and automatic screening from your Pixel settings.

Update: The feature is now available on all Pixel phones going back to the original device, not just 2 and 3. This post has been updated to reflect that.