Quite a few questions here, some of which I've answered previously:
When it started and when it ended?
The duel of honor developed in Renaissance Italy, tied into the rising humanist movement and the evolving centralization of the state. It had earlier antecedents in medieval practices, namely the trial by combat, but there is a fairly clear break in the early modern period as those are ended, so they are not viewed as the same thing. For more on this I would point here. The duel would continue into the 20th century in some countries, and a few even saw duels post-WWII, as touched on here.
It was actually used to solve legal disputes?
While those antecedents were literally part of the legal system, and had specific applications, such as touched on here, but the duel of honor, being inherently illegal, was emphatically not used to solve a legal dispute, but rather interpersonal issues that revolved around ideas of honor, which we can conceptualize as the outward presentation of elite masculine values. Those could have a legal dimension or parallel, but it was a solution outside of the courts and not offering a legal settlement. I touch more on this here, as well as the interplay with law here.
How duels worked?
Depends greatly on where and when you are! A Duel in 1605 France would look very different than 1820 England, not to mention 1905 France! But there were generally expectations and regulations that existed by social convention and dictated the broad scope of things, and this looks at the 19th c. pistol duel that would be common in the Anglo-American tradition, while this looks at 19th-20th c. Italy, here is Russia, and here is fin de siecle France. This also looks at deloping, and this looks at early modern sword duels.
Who could challenge and under what circumstances?
Dueling was the preserve of the male elite. Dueling was a symbol of equality between them, and a challenge could, in theory, but for any reason that one felt insulted over by another. I touch on one angle of this here specifically in looking how Jewish men used the duel to try and claim their right to equality in elite society.
What if the other person refused?
Depends on who you were. I touch on these issues here looking at how to decline a duel, and what might occur if you did.
A "Champion" representing someone was a thing?
Not really. In the old trial by combat there were some provisions for a champion under the law, but with the duel of honor it is a whole other matter. Certainly if a woman was insulted, a man was expected to defend her honor, as they generally couldn't duel, but a man of honor wasn't supposed to have others fight his battles for him of course. The closest you will see is men challenging over an insult to, perhaps, their aged father, who was too infirm to duel, in order to uphold family honor, but appointment of a champion was just not really a thing within the affair of honor.
Was it popular/accepted socially?
Sort of? A lot of ink was spilled for hundreds of years about how horrible the duel was, but it persevered almost everywhere into the 19th century, and beyond in some places. I look at religious opposition here, but as you can see, it did little to change things in the immediacy. as I touch on there and elsewhere, dueling was something of a self-perpetuating system which men sometimes described as a tyranny even as they engaged in it - a common refrain being that they dueled because they were a coward, and true heroism would be to refuse.
For further reading, check out here and if you have any other follow-ups let me know.