The Owner's Manual answers these and other questions about the 4WD system in pretty good detail. You might want to start there.
The short answer is that you can change it while you're moving as long as you're below a certain speed. That speed is quite high for 2WD -> 4Hi (I think 50 MPH), but you need to be going a lot slower to switch from 4Hi to 4Lo. Lo is designed for maximum power; Hi is the typical 4WD mode.
Once you've switched, I don't believe there is a speed limit on 4Hi. There is a limit on 4Lo. Again, the Owners Manual has all the specifics.
You can use 4WD in any situation where you might want more traction. Wet roads, snow, and of course off-roading. I think 4WD is great in the rain and snow, as the tires never spin - the truck just goes when you step on the gas. 4WD doesn't help you stop, though - that error in judgement is how many people flip SUV's over in bad weather!