You use Public Wi-Fi, see this Apple article: Use captive Wi-Fi networks on your iPhone, iPad or iPod touch
Use captive Wi-Fi networks on your iPhone or iPad – Apple Support (UK)
-> ask the hotel for a username & password to log in to their Wi-Fi.
Nowadays, Public Wi-Fi is offered for free, in big cities, shopping centers, in Public Transport (bus & train), airport, restaurants and others.
That depends on where you live.
If at the moment you are away from home and there is no Public Wi-Fi, you have to use Mobile Data, for sure go to -> Settings -> Mobile network -> Mobile Data -> ON.
Turn Off Hotspt.