@GBGames well, there are several things going on in the game I didn't have time to properly explain anywhere :)
When one of the guys with the guns see you, there's a chance that he triggers an alarm. That's when the lights turn to red. When the alarm is activated, all the other soldiers will rush to the point where you have been seen last, so it's a good idea to leave as far as possible.
The hiding mechanism is handy when you are being cornered. When you are hiding, the humans can only see you if they are next to you (like... 30 or 40 pixels away, I think), but they don't if they are in adjacent rooms (or in the same room, but far away), so if you find yourself getting chased by three soldiers ... hiding in the corner of a room and wait for them to leave is a good way to manage the situation. Also, since the moving humans can only see in front of them, hiding behind a ladder and wait for a soldier to go down and turns his back to you is a good way to be able to get hand-to-hand with them without getting shot first :D