tl;dr: It didn't "come from" anywhere; events happened because they had to happen in order to maintain a consistent timeline. The character did the things he did because he'd always done them, and because he knew he had to do them in order to avoid an even worse paradox.
This movie presents a fairly typical scenario involving a predestination paradox. This is a staple of time travel movies, where a character performs actions that he has already seen himself perform, because if he doesn't he will break the chain of events that led him to travel back in time in the first place.
The answer to your question then is that the original decision to take an action, for example,
Hector's decision to stab the girl in the woods
didn't "come from" anywhere. It happened because it had already happened, and always would happen, at that exact moment in time. If it did not, then
Hector would never have been chased to building and entered the time machine
and the time line would have been broken. He appears to understand this and acts to maintain the sequence of events, but there is no "first time through" the story where those actions of his future self didn't happen. They always happened.
To accept this requires a certain particular interpretation of how time and causality really behave. Since time travel, as far as we currently know, isn't possible, we have no idea how such an event would really play out. To understand movies of this nature you simply have to accept that cause and effect don't work the way we normally believe, and that it's possible for an event to happen without any "original source".
Among sci-fi fans you will often hear this phenomenon cited as the Timey Wimey Ball, based on a quote from The Tenth Doctor in one of the best Doctor Who episodes ever filmed. (Obligatory TV Tropes warning: you may lose many hours upon clicking that link.) In short, time in time travel movies doesn't work the way you think, and you'll give yourself a headache trying to make sense of it that way.