In my world, the people who have the ability to do magic are about a quarter of the world's population. They are considered legal in their respective countries in theory but they have few rights and are discriminated against though they are expected to use their powers to help their countries. (The magic is based on the elements) so a person who can manipulate water might use his power to help boats move faster like a speed boat creating effective transport through cities. How would the discrimination affect the magic users and their society?
I suspect most non magic uses would view them with fear. I could see a scenario where magic users are segregated from the rest population. Marked at birth, to warn others of their power. If average person sees someone the mark of a magic user running loose they you know to report them to the authorities.
The reason for doing this pretty obvious. Fear can be a great motivator for oppression, especially if the magic users were once the ruling class that oppressed non magic users until they rebelled.
One fourth of the population is fairly large group of people. Non magic users would have to find some way keep this to population from rebelling. Perhaps they could introduce magic users to some kind of addictive drug as children. Making them dependent on the government to continue supplying them the drug. Or they could find some way to nullify their powers, maybe sometime chain made of a certain metal or some kind of plant that when eaten suppresses their abilities.
I suspect the Magic users would be segregated. Laws be past that would prevent them from taking jobs that do not involve their abilities. In the case of war it would be mandatory for them to serve in the military. Laws of the past preventing them to hold any type of political position as to prevent them from taking power. Strict laws also passed keeping them from using there power as a weapon except for the defense of their country.
Side note : I would lower your population magic users, 1/4 population it's still pretty large minority. And if each has magic powers it would be very difficult for a medieval government to keep him in line. I would make it more around 10% of the population.
If the mundanes can prevent the wizarding folk from organizing it should be a snap.
techniques for subjugation
Divide wizards into competing factions. All the wizards together can easily beat the mundanes but the fire mages can not beat the rulers and the water, ice, and tea mages.
Degrade the wizarding families. Sell folks up and down the river. Weaken familial bonds ESPECIALLY intergenerational ones.
Institutionalize muggle supremacy make sure that every hedge witch and conjurer knows that the only live at the whim and tolerance of the ruling class. Use disproportionate violence at even the slightest infraction. Bonus points if the punishers are magic users.
Co-opt talent within the wizards. If a someone in the magic class shows great talent take them away bring them close to your bosom and treat them as nearly human. money, food, fame and privilege. Teach them they are different from the bad wizards. They will end up hating their people more than you do out of shame. This also sets up intense ingroup competition favoring selfish behavior.
Shame them. Humiliation does increase violence but is it the mindless self-destructive kind that "proves the inferiority" of the slaves.
If you do this correctly you can even continue to exploit them after the official end of slavery.
A lot depends on how powerful magic is. If it is very powerful then I don't see it as likely the magic users could ever be enslaved in the first place. The converse looks more probable. However I can think of some possible ways it could happen.
(1) Kryptonite. It's a cliché but there could be some natural material, machine, counter-spell or other convenient plot device which negates the otherwise all-powerful magic.
(2) Elephant taming. Elephants are far stronger than humans. Nonetheless humans can tame elephants and make them work. They do it by taking the elephant cubs at a young age and raising them apart from other elephants. The elephant becomes completely used to obeying its mahout. The relationship can be cruel, or affectionate, or a mixture of the two, but the point is that despite it being physically able to easily crush the human, the elephant cannot conceive of doing other than obey.
(3) Take hostages from among the magic-users' non-magical relatives. You can't threaten to harm a powerful magic user directly. But you can let it be known that the names and addresses of all her relatives are known and things will not go well for them if she makes any trouble. Even the most talented magician cannot protect multiple people 24-7. This assumes, contrary to the scenario above, that the magic people have non-magical relatives whom they know and love. It would not work if the magic users were a separate race, or if they were taken away at birth from their families so that bonds of affection did not form.
(4) Make use of traitors among the magic users. "Good morning, Mr Magician. We are sure you are a loyal citizen despite your unfortunate genetic condition. Where would you like to put your Earth Magic to use - down in the depths of Government Uranium Mine No.5, or in a nice comfortable office keeping our underground network of surveillance spells on your fellow magic-users up to date?"
If magic is weak, the situation is not very different from that of people with unusual skills being enslaved by others who lack those skills - a situation that has arisen often; for instance it was not rare for Roman families to employ highly educated Greek slaves as tutors for their children. To see how that would work look at the sadly numerous examples of slave-owning societies in history. (I do think, however, that the many stories that show superheroes, mutants or magical people being openly enslaved in societies that in all other respects resemble modern democratic countries in the real world are unduly pessimistic. Have all the human rights lawyers been dissolved by a spell, or what?)