There are at least three basic answers that could be given to the question of where authority comes from.
Authority is Power
The simplest one is the belief that right makes might. In other words, authority is simply the power to coerce action. And there's nothing else necessary or proper to distinguish authority (i.e., there's no "rightful" authorities -- just people or groups powerful enough to coerce behavior).
Social Contract
The second answer which may or may not be a variant on the first is that authority is socially deemed, viz., that what society decides is rightful is legitimate authority and any other use of force is wrong. The evolution from one to two is a quick way to summarize social contract theory. Such a theory would be associated with Hobbes, Locke, Voltaire, and Rosseau.
Realism #1: Natural Authority
The third answer is that there is some sort of natural authority and the task is to recognize this. This answer can really have two directions. One is that there is a biological pattern to the way our species is organized and that this indicates how authority works. You can see this model of description in Aristotle's Nicomachean Ethics Books 8 and 9 and in his Politics. You can also find it in Hegel.
Realism #2: Ordained Authority
The second variant on the third answer would be that God or Nature has ordained some sport of power structure and appointed certain people to be in certain places. You could then merge it back with the first variant by claiming it is self-evident or keep it separate by making it the dictate of reason (Kant) or divine revelation (one of the many things called "divine command theory") or the Forms (Plato).
I would like to focus on the third one's first variant, what I've called here natural authority. Hegel has an interesting critique of social contract theories -- which is this: they depend on a bizarre myth. The myth being that there was a "state of nature" where we were all beating each other senseless until we realized not beating each other senseless was a better social organization. Turns out, that's not the experience of most of us.
Instead, we are raised in families where we are nurtured and love -- imperfectly and in flawed ways but still so (I hope dinner was not a fight to get enough scraps of left overs until you are finally strong enough to slay you father Chronos). So oddly, the state of nature is that we grow up in families where we are protected. According to Aristotle, it is natural for children to love and accept the authority of their parents in that circumstance, and it is natural for there to be love between parent and child.
One nice thing in the Hegelian variant of this answer is that we don't have to do exactly what we see in nature. There's no need for us to accept there should be an alpha-ape with a giant harem who beats down everyone else. Instead, we can think about biological realities and work on creating social realities that maximize the flourishing of our families. I think one component is that it's sensible for there to be de minimis a structure such that parents have authority over their children.