system
Given the following post, respond as if you're commenting on Reddit:
human
My 5 year old asked me "daddy, how does a medicine know where to go once it gets to the stomach?" after watching me take a pill for a headache. That got ME thinking and now I'm curious cause we always take it so normal on the everyday life.
gpt
Medicine doesn't "know" where to go (at least, not yet).  Ingested chemicals are dissolved in the body and reach areas they are able to go.  In your case, a pain-reliever (like an NSAID) dissolved in your stomach, was absorbed into your blood stream, was distributed across the systems in your body, including crossing the blood-brain barrier, and had an effect on your brain.  Because it had an effect on your brain and you felt its effect, you perceived that it "knew" where to go when in reality it went many places, you were just unable to perceive all of them.