system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does instinct work?

How can animals just know stuff without having to learn it, just because their ancestors all did it?
gpt
It has to do with how the neurons are arranged and connected.  Our brains are essentially extremely complicated computers.  When presented with a certain input, a certain output is going to happen.  Some of these arrangements and connections are plastic, meaning that they can be changed.  This is what allows us to learn.  However, a lot of others are fixed and prespecified.  instincts are part of these, once your neurons are presented with a certain input pattern a fixed action will occur.  

At the most basic level, this is due to genes.  animals whose genes forced neurons to form certain connections survived and passed these genes on to their children.