This proverb means that getting involved in a fight or argument that does not concern you can lead to trouble, just like grabbing a random dog's ears can result in getting bitten. It is a warning against interfering in situations that have nothing to do with you.