The answer to this question is Emotion; memory.
Emotion will influence the feeling that exist at that particular moment and will influence the behavior tat we do from certain impulses.
Memory will make use recollect the result from similar occurrences so we know better on what to do if we experience it again.