How were they trained? How did they know where to travel for longer distances? Was it a common commodity like how everyone is allowed to have phones nowadays or is there like a bird post office? And where any other animals used as messenger besides birds?
These are two answers-in-one by u/Celebreth, one of which is a total classic, the thrilling story about Cher Ami, which explain why pigeons are so reliable as a way to send post.
These answers do not respond to all of your questions in detail but they do give a good idea as to why they were used and how common they were.
Now I don't know if the following is allowed because it's more science than history but I can just share my own experience with homing pigeons to at least answer the question "how do they work?".
When I was a kid a couple of people where I live used to still keep "carrier pigeons" or "homing pigeons" since carrier pigeons are another breed of pigeon no longer used for "homing".
Basically these guys are a breed of the common pigeon selectively bred for their incredible ability to fly back to their nest, no matter the distance, called "homing".
A lot of birds have an innate ability of being able to sense the Earth's magnetic field which allows them to orient themselves for very long distances. It's the same mechanism migratory birds use to find their way back to their nesting grounds. Homing pigeons have simply been bred so that they can do this fast, reliably and over long distances.
If you wanted to send a letter to someone else using a homing pigeon that person would need to have access to the pigeon's nesting place (generally a coop where many pigeons would nest) and you would need to tie a letter (around the legs or even on its back) to the pigeon that nests in the receiver's coop.
Each pigeon can only go back to one location they have "memorized" as their nesting ground so you cannot use the same pigeon for "back-and-forth" communication; you need to give "your" pigeons to another place you want to receive correspondence from and you need to have "theirs" if you want to be able to send them correspondence.
I'm not aware of any other kind of bird being used for the same purpose though.