To get past the guards in Hyrule Castle, one must have stealth. You have to experiment a bit to see where the guards are located. After that, just keep your distance and they shouldn't bother you. To get started, jump over the gate and walk up the hill beside it. This is the hill DIRECTLY beside it, one with grass and stuff. Do NOT try and follow the path.