The 4x4 Hubs on a vehicle is the device which engages the axle to the differential. Without the hubs there would be no drive sent to the wheels.
On a rear wheel drive vehicle (most 4wds) the rear hubs are constantly in a locked position and cannot be unlocked, also the diff is constantly engaged to the axles.
When in 2wd (on a 4wd vehicle) with the front Hubs locked, 4x4 need to be selected for any drive to be transferred to the front wheels. If the hubs are locked and 4x4 has not been selected there will also be no drive to the front wheels.
To be in 4 wheel drive they need to be locked and the 4x4 selected, this will transfer 25% drive to each of the 4 wheels.
The hubs are manual or automatic depending on which make and model you own, most 4 wheel drives these days are automatic so there is only the 4x4 selection stick or button to worry about.
Many solid axle vehicles have manual hubs, but not all, for example the current 70 series Landcruisers have front manual hubs and the Current Jeep Wrangles (which are also solid axle) have automatic front hubs.
If your Front Hubs look like this then they are manual!
If they are not visible like these they are automatically engaged when selecting 4x4
Manuals on the other hand require to be engaged manually, this is done by simply
turning the Hub from "free" to the "lock" position.
Manual Hub Myth:
Is it ok to leave your manual Hubs in the locked position?
To clear up the myth about manual Hubs see the video below.
Remember to disengage 4wd when getting back onto the Tarmac/road base or damage to the drive line will be highly likely, see here for details.