I'm not sure if "how did Roy learn to stand so still" is the best way to ask that question. I think a more appropriate question is "why does Roy stand so still, and when did he have to do it before?"
In chapter 5 of Hoot, Roy has gone into the woods to search for the running boy. Roy gets to a camp of sorts and starts going through some bags in order to perhaps learn something. One of the bags that Roy pours out is full of poisonous snakes. Roy is rightly terrified and stands as still as he possibly can. The incident reminds him of the time that he was a on a class trip in Montana, and he came across a grizzly bear. He stood perfectly still for the bear, and the bear eventually moved away. It was the same thing with the snakes. Roy figured standing perfectly still was his best defense. Mullet Fingers eventually shows up and advises Roy to slowly walk backwards away from the snakes. Roy does that and survives . . . only to have a hood thrown over his head.