The image is of holding a wild animal, like a wolf, by its ears, which is a precarious and dangerous situation. You have the animal's attention, but it could easily break free and hurt you.
Here are some examples of how the idiom is used:
* "I've got the boss by the ears with this new project. I can't afford to mess it up." This suggests the speaker has a lot of power and leverage over their boss, but it also implies a risky situation.
* "The politician had the voters by the ears with their promises of change." This implies that the politician had strong control over the voters, but it also hints at the possibility of losing that control.
In essence, "to have someone by the ears" implies a precarious level of control over someone, which can be both beneficial and dangerous.