Thread devices cannot access the internet without the cooperation of a gateway device. The topology is ultimately the same as Z-Wave with the devices communicating with a hub and the hub communicating with the internet. Thread is based on IEEE 802.15.4 just like Zigbee, but it uses IPv6 with extensions as the network protocol, for both a more powerful and flexible network protocol and more implementation commonality with existing network stacks.
That said, an explicit goal of Thread is to make the implementation of the gateway device easier and thus allow devices to communicate with a backing cloud service with less active participation of the hub... the hub is still "in the loop," but it doesn't need application-specific implementation for every device, it can just forward messages.