If you're talking about dogs, you do have to get a bit physical, but it doesn't necessarily have to hurt them. You either hit them with a curled up newspaper (it doesn't really hurt them much, but the noise scares them.) OR you grab the dog by the scruff of its neck and forcibly make it lay down (to show dominance) and yell at them. The dog should get the idea that it shouldn't have done whatever it did. Though if it's not something that warrants that much, putting your dog somewhere that it doesn't want to be for a few minutes works.
Hitting your dog will get the point across too, but if you do it regularly your dog will probably either develop violent tendencies or be scared shitless of people, so if you want a house pet, it probably isn't the right way to go. Plus it's flat out mean anyways.