system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How did courier birds throughout history know where to deliver their letter?
gpt
Courier birds were usually "carrier pigeons". You put a "coop" - basically a box with some straw and a few small doors - up on your rooftop and raised a pigeon in it, and it made that box its home. 

Then comes the secret. Pigeons have excellent sense that help them navigate long distances. They can use the earth's magnetic field to find their way home once released from pretty much anywhere else, even if they don't have anything visual to look at as clues for direction. 

So, once your pigeon makes your coop its home, you take that pigeon to some other location, maybe send it to the front lines of the current battle, or to a different city. There it stays until it's needed to carry a message. Then your agent at that location ties a message to its leg and releases it, and it flies home, delivering the message.

Fun fact: pigeons also make excellent smugglers, and have been used to bring small quantities of drugs over borders.