your owner's manual will tell you.
4 hi can be engaged at any speed is how its described. so 4 hi you can go in and out anytime you want. 4 lo however can only be engaged when stopped, transmission in nuetral. they say you can be barely rolling also, but i just do it at a complete stop.