The algorithm animals use is less based on fitting objects into a formal ontology the way we do ("this one is a human, that one is a gazelle"), and a lot more based on salient features that are being perceived in the moment. When it comes to differentiating between danger/prey/not-interesting, the most important feature seems to be size. Other important ones are pattern of movement, sound and smell. There are sometimes additional highly-specific signals that can elicit specific behavior (example for instinctive ones: the red spot on a gull's beak, example for learned ones: a command for a trained dog), but these are species-specific and won't bring you further here.
Ontology-based learning does happen (e.g. once a predator has been wounded by a porcupine, it learns to avoid all porcupines), but I have the impression that the perception-based behavior is usually more dominant for animals. For example, my cat has learned very well that the string on her rod toy is totally uninteresting once caught. Nevertheless, as soon as I wiggle it in front of her, she cannot help but go into a hunting mode. It is even observable how she is not so much using her intellect to decide "now I will play with this toy", but how her autonomous nervous system visibly drives her body, from changing her pupil dilation, up to the typical haunch twitches.
So, it is not especially important that the animals have never seen a human. As soon as they perceive the human, the features observed in this perception will guide their behavior. If humans are of the "proper" size, they can be attacked for two reasons, either because they resemble prey (again observable in house cats, they prey-attack anything in the size range of a mouse), or because they resemble a danger to be driven away (typical in e.g. swans attacking kayakers - but note that the reaction of a Baltic seal to a kayaker is panic, again because of the size, they are rather undaunted by larger and noisier motor boats).
The behavior of the animal will depend not only on what it perceives, but also on the context of the encounter. There is the "aggro radius" mentioned in other answers, its size depending not only on species, but also on the lay of the terrain, the personality on the individual animal, and on its current emotional state. Other factors matter too - meeting a lion pride at dawn, when it is looking for prey, is different from meeting it at noon, when it is holding its digestion break.
Getting to know humans will get animals to learn behavior in some very specific ways, which won't have that much influence on being attacked in general. The closest would be if a lion pride learned to specialize in humans - they are not indiscriminate, each pride has its favorite pray animal, and the knowledge how to hunt for that specific animal is passed down from the adult lionesses to the young ones. The more common examples are the ones where it changes the animal's chance of survival - if you have an animal species which would behave neutral to a human-sized (or a boat-sized!) animal approaching them, and thus becomes easily slaughtered by an expedition of humans newly arrived in its territory, or hunted animals learning that humans are dangerous at distances larger than what their instinct tells them. Also, there are of course the cases of taming animals, making the behavior of that individual animal change drastically, although in the long run, you will still have instances when the animal chooses an otherwise suppressed behavior from its repertoire, that's how zoo keepers or circus trainers get injured by big animals.