Basically the IS will look for movement and try to compensate, so a tree branch in the breeze for example, may blur your shot if on a tripod.
I'm baffled by this. Maybe you're thinking of Type I and type II IS on canon zoom lenses.
Type I will compensate for vertical and horizontal movement in the camera, due to shake normally.
However, type II will no try to correct horizontal movement in the camera, great for if you're doing a panning shot.
If you pan, following a moving motorbike for example, in portrait mode I guess you're stuffed

:bonk:
as for tripods and IS being off...the system is an active system with moving/floating parts...so if there is absolutely no movement, the act of trying to stop it will hinder your photo quality.
Imagine that you were guiding someone trying not to spill a drink. if the cup is on a level stable surface then you may knock them a little. or imagine the same thing in drinking jenga!
this quote might better explain it
Image Stabilization (and vibration reduction) lenses look for vibrations in your camera in order to reduce it - however if they don’t find any (like when you are using a Tripod) they actually can cause it - and as a result actually cause camera shake.
apparantly some new uber canon IS lenses auto detect that they're on a tripod
maybe there is a threshold value of vibration, below which IS is deactivated and the lens elements locked in place