'follow' and it's stealthy counterpart 'shadow' allow your character to attempt to keep pace with another character. This means when they leave a room, you will follow them.
You will continue to follow them until you 'stop following' or 'stop shadowing'.
If you are following someone and you 'hide' before the next move is initiated, you will be transitioned to sneaking.
If you follow someone, they are notified that you are now following them. This is not the case for shadowing, though if they actually see you sneaking around depends on the stats and skills of the involved characters.
If someone is moving quickly, you may lose them. If you are moving and attempting to not lose the person following you, you may wish to limit your 'go' movements to two or three rooms at a time.
Injuries and other things can play a part in the movement speed of both characters, making it easier or harder to follow / evade.