Democrat nominations are voted on by large numbers of people.
I believe Republicans actually have a democratic nomination process without superdelegates, which is how they got Trump -- IIRC he had a few early wins and snowballed from there.
How she did it could probably be the subject of an entire book, but no one has ever come up with any particularly scandalous stories about it so far.
Trump likely would have lost against almost any other candidate, but he had help from the Democratic party, who treated Hil's nom as a coronation.