Jeepers you guys know how to convolute an issue...
I'll see if I can make it worse....
On the manual shift models, when you shift into 4-hi or 4-lo, the transfer case engages the front dirve shaft and puts power to the front differential and axles. However, without the hubs engaged in teh lock position, the power is not transfered to the front wheels (they still spin free). This allows the use of 2WD lo, for boat ramps and the like, where you don't need 4WD, but the lower range is nice.
For the hubs to engage, you must turn them to "lock". At that point, when the transfer case lever is engaged in either range of 4wd, the front tires will be drive wheels, just like the rears.
Neither one will work without the other. For 4WD to work, you must put BOTH hubs in the lock position (only engaging one WILL NOT HURT ANYTHING like Oi8228oi says, it just won't accomplish anything. The power will be transferred to the unlocked axle, and it will just spin away, like if one tire is off the ground when you'r stuck), and you also must shift the shifter lever into 4WD. Miss one or the other, and you do not have 4WD.
You can lock your hubs, if you are expecting to use 4WD on any given trip, and leave the t-case in 2WD. It will add a small amount of drag in doing so, since the front axles and driveshaft will be turning without any power, but the nice thing is that it makes you shift-on-the-fly to 4WD high range. It never hurt my fuel economy much to do this, and it was worht it to not have to stop and get out when i needed the front wheels to go.
You do not have to stop or go into neutral to shift into 4-hi. I do it at 45 MPH all the time, gears engaged. I just don't have my foot in the throttle when i shift, is all.
You DO have to stop and go into neutral to shift to 4WD Lo.
JUST BECAUSE your front driveline was spinning does not mean you were engaged in 4wd. Engaging the t-case alone will spin the driveline, but the power does not transfer to the wheels because the hubs are disconnected. Engaging the hubs alone will spin the driveline, also, since the wheels spinning are locked to it. However, since the t-case is not engaged, there is no power being transferred.
BOTH hubs and t-case need to be engaged to get 4x4. If you want to test it, engage both, turn the wheel about halfway, and drive forward slowly on dry pavement. The front wheels will fight against each other and you'll feel binding. That is how you know you've got 4x4...