When you are in pain, how does your doctor know where it hurts? You usually have to tell them. You might draw on an image of a body exactly where you are experiencing pain, or rate your pain on a scale. Pain is typically described as an unpleasant sensation, with physical, emotional and cognitive components.
When an animal is in pain, can we tell? Maybe. For some animals, there might be clear signs of pain, such as an obvious injury. In the “old days” philosophers such as Descartes did not believe that animals felt pain, even if they had an injury; it is only in the last 30-40 years that scientists have acknowledged the likelihood that animals (particularly other vertebrates) feel pain, and that we should behave under the assumption that they do.