People who had been members of the Nazi party (about 10% of the population) were removed from any kind of public position - including low down jobs like teachers. Hundreds of thousands were kept in camps while they were investigated and questioned. They were classified on a sliding scale of how "Nazi" they'd been, and the top level ones were tried for war crimes and the low level ones were just rehabilitated which was done through education in democracy or racial equality.
Severity of this process varied from region to region, different allies controlling at the time different parts. West Germany was much more lax and some Nazis continued in positions of power, but East Germany was more intense. It was complicated I think, a lot of key industrialists had been prominent Nazis who were doing not very nice things - producing weapons for the concentration camps or war, and some were using slave labour. All that considered there was an economy to run too. A lot of "useful" Nazis were let off the hook and sent to useful places. For example the best scientists went to America to work for them. Yuck. But hey ho.
Young people were exempted from repercussions on the understanding they'd been too young to know any better and had been brainwashed by propaganda into the horrific acts committed but a lot of other Nazis were punished even for low level support of the Nazis. Aside from the obvious trials, many were imprisoned and a lot were banned from working as anything other than manual labourers.
Everything was completely censored. Books were banned, posters, songs, paintings - anything depicting Nazism or that was racist to Jews. Some places like antisemitic media companies or newspapers were closed down.
All Nazi laws were repealed - particularly the racist ones. Nazi judges and police were removed from their jobs. The Allies enacted laws and regulations aimed at preventing the resurgence of Nazi ideology, like banning Nazi symbols, organizations, and hate speech.
In schools, the Allies implemented new educational policies that aimed to promote democratic values, critical thinking, and tolerance of all races as equal. They revised curricula to remove Nazi propaganda and indoctrination and introduced new subjects focusing on democracy, human rights, and the consequences of totalitarianism. Teachers were retrained to promote democratic principles and racial equality and textbooks were revised.
Efforts were made to promote international understanding and cooperation through things like exchange programs, cultural exchanges, and collaborations with foreign educational institutions so German children were made to see the world outside their own and to begin to foster peaceful feelings with other nations and races. Children were taught about what the Nazis did, and it was explained to them why it was wrong but an effort was made to retain German culture and celebrate it, just minus the Nazi bit.
It was a complex, and very difficult process that was not perfect and no doubt in parts was cruel and involved collective punishment. No doubt many suffered. I doubt anyone would get away with doing nowadays. We'd no doubt here that it was human rights abuse, or white supremacy, or something else. That said, I am awfully glad someone did it and I imagine German people largely are too.