Finding Yourself on the Right Side of the Tracks
Hyrule is very class-based. Those on the rich side despise the poor. Link, as a poor ruffian, is not welcome in Hyrule Castle Town's rich sector. Therefore, there are certain things to watch out for.
Hyrule's guards work for the rich side. Even stepping foot in the rich area warrants their attention. Guards have two levels of alert:
Link walks within eyesight of a guard, they'll start following Link at a walking pace. They'll throw him into back into the poor side of town if caught. Link can escape guards by leaving the guards' eyesight, walking into a shop, or leaving town. The guard will wander around the area where he lost sight of Link randomly, then return to his default position.
When a guard spots Link, he will run after him and attack until he dies. Link can escape guards by hiding, walking into a shop, or leaving town. If guards see Link hide, they'll stick around. Otherwise they'll keep wandering around the area where they lost him.