When an animal bites, it's something that you may not be expecting. Maybe you were just walking down the street when it happened, or you were visiting friends. Whatever the case may be, when you get attacked, there is no easy way to handle the situation.
Immediately following an attack, you need to seek medical help. If you're attacked by a dog on the street with its owners, they should not leave the scene. Any witnesses to the attack should stay where they are as well, so they can assist you and call for help. If the owners have the dog's paperwork, such as a rabies vaccine tag or other helpful information, get this for the emergency team and medical providers at the hospital.
In the case that you're attacked in a friend or family member's home, they should call for emergency care. In that situation, you'll likely have better access to veterinary records, which will help the EMTs determine which treatments you need on the way to the hospital.
In all cases, it's a good idea to have the police come to the scene, even if it's the pet of a friend or family member. The police just want to make sure that you and the animal are safe. If the animal is still aggressive or showing signs of illness, then the officer or animal control may come to take it to the vet or shelter for care and testing. This can be a life-saving act, especially if the pet has a transmittable disease that you need to be treated for.