Yes, generally rats are afraid of humans because we represent a predator to them and a threat to their existence.
Rats will generally run away and attempt to hide when they spot a human in their environment.
Rats are nocturnal animals largely because it is an excellent defense mechanism against humans and other predators that are largely active during the day.
Although rats are shy of then afraid of humans, if they are cornered and unable to escape, they may become aggressive and attack a human or attempt to bite him.