To expand a bit on the above answer, you don't have to change them to freewheel, you could leave them always in 4x4 but as mentioned the vehicle would use more fuel (slightly) so the idea is that when you don't need 4x4 you set them to freewheel.
Freewheel hubs can be manual which means totally free in both directions or semi auto which means thet connect when driven drives only forward or fully auto which means that they will only connect if the drive shaft is driven in either direction but not when turned by the wheels.