The squirrels are attuned in their brains to understand that owls are a threat because it is a predator. This is visual stimuli that evolved over many years to elicit a conditioned response. This is an innate behavior (meaning that it has been pre-programmed into an animal's genes) and offspring are naturally born with it.