If it is the older style three cylinder system, here is how it works: The pentagon shaped trim cylinder is larger in diameter and thus generates a greater hydraulic pressure against the engine. It is also located at a different angle so this pressure is applied with more force. THUS you can trim at any engine speed because the mechanical and hydraulic pressure is great.
Now the tilt cylinder has a smaller diameter so it generates less hydraulic pressure. It is also located at a very sharp angle to the engine and thus can not generate much mechanical force. THUS you can not tilt the engine if it is running in gear at more than--about 1000 RPM. This number varies from system to system. Some can go as high as 1500, some can not.
If you tilt the engine and then put it in gear and raise RPM, it will tilt down rather quickly. This is because the tilt cylinder piston has relief valves built into it to allow the engine to tilt up quickly if something is hit at speed. The other check valve allows it to return a little more slowly. There are also check valves built into the pump to prevent over-pressuring the system. You can tilt the engine and run at idle or slightly above for shallow water operation.
If you try to tilt the engine at speed and hold the switch for any length of time the oil will foam. Same thing will happen if you trim all the way down and hold it. Older 3 wire trim motors without relays had a bimetal switch built into the motor. If you held the switch too long the bimetal would heat up and open. Then you needed to wait until it cooled to have trim/tilt again.
At planing speeds, going to full trim and holding the switch for a couple of seconds to ensure it is actually at full trim (if that is what the hull requires for best performance) will do no harm.