Let us say you take a certain path every day.
There is one house where you always see a small dog, Fifi, in the window.
One day you see Fifi, but there is a second dog there too. You don't know anything about this second dog. You saw Fifi and ANOTHER dog.
There is another house where you see Fido in the yard. You know they own two dogs (exactly two dogs) because you talk to the people who live there sometimes. Then one day, there is Fido, and there is a second dog. You know they only have two dogs, so you see Fido and THE OTHER dog.
The other is used when there are two.
Another is used when there may be more than two, or the way we say "a" because we don't have any information about the second dog, even if there are only two.