Wizarding government works under a hellishly disjointed system, and I have some trouble making sense of it, because it’s pretty much a slapdash job. A lot of very intelligent people have written essays on this topic, and those are better and more worth reading. The thing is that those essays tend to tie the package up very neatly, compartamentalizing little bits until it all makes sense. And my impression is that the system's completely pointless. It came into being by chance, and it's not successful in anything that it attempts to do.
The Ministry's main power points are a Minister of Magic, the various bureaucratic departments, the Wizengamot court, and individual leaders in society, the most important of whom is the Headmaster of Hogwarts. It’s more or less the executive branch of a modern country with a horribly outdated judiciary and no legislative branch whatsoever. I’m under the impression that all positions are made by appointment: the Wizengamot appoints the Minister, and the Minister appoints pretty much whomever he likes. But he’s restrained by individual leaders and different interests groups, who can severely limit his power, even if they can’t take him out of office.
It’s not a very effective government either, because it’s so easy to get around. You have illegal substances at home? Disillusion them! Some Aurors are coming to arrest you? Apparate away! Illegal spells are published in easily obtainable books, and even if the Ministry can detect someone casting one, said someone can always Apparate to France, afterwards. Saves the old 24-hours-to-leave-the-country deal. And there’s probably some way to shield spell detection besides.
Not to mention that there are an incredible number of people who put the secrecy of the wizarding world at risk on a regular basis. While many people have asserted that the need for secrecy is the basis of the Ministry, their rules are rather loose, most such dangers are only punishable by fine, and by all appearances, they’re only selectively enforced. This is the wizarding world’s biggest threat, and they really don’t much care. You end up with two pictures. One is of a bunch of people who don’t feel endangered by Muggles in the slightest, because they’ve lived like this for hundreds of years. The Ministry’s only a bother and a good source of work. Which isn’t really that different from any government, but this one has far fewer benefits.
The other is incredible picture of incompetence. Because if there’s nothing special in how the Ministry is protecting the wizarding world, the only thing unique about it is that it’s failed in almost everything it does.
It just doesn’t do very much, and doesn’t have much power to do more. Dumbledore is obviously above it; from the example of Lucius Malfoy, anyone with an old name and a bunch of money is above it. Not fully, of course, but to a degree where the Ministry has little restraint over them if they're not smashing the law the bits. And no one really respects the law or authority.... contraband goods everywhere, whether they belong to the Weasleys or the Malfoys; who-knows-how-many illegal Animagi; an entire alley devoted to the sale of illegal goods, which, apparently, the Ministry pretends doesn't exist. If Harry's any example, people are left alone when they're liked and prosecuted when they're out of favor.
I’d say the system works on patronage, similar to how Pharnabazus describes it in his
essays. But the system is a little too disjointed for that. Dumbledore’s the ultimate patron in the wizarding world; he has all of Hogwarts behind him, complete with his own army, in adult and child branches. Everyone else lacks the brains and charisma to really call it a system of patronage. Malfoy gets Fudge’s favors and has a few former Death Eaters on his side, Harry had Fudge’s support at one point, and there’s personal loyalty abounds - but it’s really just corrupted nepotism. A little money in exchange for the government’s blind eye and support, obedience for a good word in the Minister’s ear and a new job, some arm-pulling to get a friend off a criminal charge. It’s early party politics, but with very vague ideological ties. Dumbledore’s the only person intelligent enough to do something with his network of supporters. Everyone else just uses their connections to give themselves a little push ahead.
My guess is that the first Minister of Magic was a well-liked man, already in power at the time. Prior to the new system's conception, all power was in the hands of old families, mostly pureblood, and the Wizengamot. Somewhere - I’d say the early 19th century, as Britain didn’t have a Prime Minister until the 1740s - things changed. A serious crisis, most likely. British wizards demanded reform; this man gave it to them. And because the Muggle government was, at this point, so much more successful than theirs, they shelved their pride and borrowed a few ideas. It's pretty obvious that everything they took was bastardized. Shelving their pride apparently didn't extend to doing serious research. This culprit was either a pureblood who studied British politics without having the vaguest idea of what he was reading, or a Muggleborn who never learned anything about his government. The result was a horrible chasm in translation.
They borrowed the departments and the bureaucracy, but neglected checks and balances, all but the oldest British concepts of rights under the law, a constitution, and representation. It wasn’t effective because they had no idea of what they creating in the first place. The Ministry had to be at least partially successful, but it wouldn't have been too long until it collapsed into its present state. And the old power sources let the Ministry stew about in corruption and ineffectiveness, because it let them do what they want anyway, and if they didn’t bother with it, it would collapse, and they could get their power back without a struggle.
At least, that would have been their initial goal. The Ministry got a bit too powerful, so its collapse still hasn’t occurred. They've lost some of their prestige in the wait, because the Ministry was actually doing something, however little, while they were minding their own business. So Malfoy, for instance, has tried to worm his way back into favor by supporting the Ministry; I suppose other pureblood families have as well. Some of them are probably on the Wizengamot, old, doddering, and rather lacking in real power. Men like Dumbledore have a huge potential power base at Hogwarts, where, if they can stand the job, they have all the influence in the world without having to work with a new system.
(I really have to wonder why Dumbledore never bothered with the Ministry. Didn't care for politics, I guess, and figured that he could do just as much to benefit the wizarding world with his influence on students. Why he didn't intervene when he saw it was falling apart, though... perhaps he thought the collapse of the Ministry would be beneficial to his cause. It'd throw more loyalty onto him, for one thing, and allow him to fight against Voldemort in a much more decisive manner. Which makes him a bit of a manipulative bastard, but I can't see any way around that anymore.)
And what’s the Ministry good for, exactly? A steady police force could do a whole lot more for secrecy than the nuttiness they have at present. It doesn’t seem to provide any real services, unless it owns St. Mungo’s and Gringotts, but those seem to operate on their own. It has jobs, sure, but a better system would have just as many, and maybe more. Interest groups work around the Ministry, not through it, and they don’t seem interested in internal development in any case. There’s no place to ask for a redress of grievances. The population isn’t even represented theoretically. And no one really cares.
The point, really, is that this is a caricature of government, frozen and ineffective, with no demand for change from anyone. And if we’re going to ask how it works - well, the problem is that it doesn’t.