Each different character has its own meaning. Two characters would means different thing (may or may not be related) even if they are pronounced the same.
To figure out, you may refer to a dictionary. It would list out all possible writings for a particular meaning. For ぞう for elephant, you will not find 三 in the list.
For names, just remember them one by one. Even Japanese cannot tell which character is used.