As with most things in our complex world, there is no one solution to the problem of occasional (and possibly growing?) outbursts of support for this kind of hatred. I don't know whether to blame a lack of understanding of history - and as an historian, I'm a little biased in favour of that viewpoint, the consequence of real or perceived lack of opportunity which is often closely linked to poverty, the manifestation of latent human fears of the 'other', or ignorance and plain old dumbassedness, or some combination of all the above and other factors.
There seems to be at best a bubbling undercurrent of hatred in most if not all modern human societies. And at worst there can be an extraordinarily destructive eruption of violence that results from that hatred. In western society, the Jewish community has of course long been the most horribly victimized. Not only during the 1930s and 1940s, but stretching back millenia. The holocaust stands out because of the sheer scale of the thing, the industrialization of mass murder, and the intent to destroy an entire people. The holocaust was humanity's greatest crime against itself and that should never ever be forgotten. But at the same time its exceptionality should not stop us from discussing other examples of bigotry, hatred, and genocide. And examining other events should never take away from the suffering of all victims of the holocaust which of course included others such as Romani, GBLT persons, and others deemed less than human.
So then, how do we deal with this? I would suggest looking at the root causes. It is not at all difficult to understand how the NSDAP came into power in Germany in 1933. Just read some contemporary newspapers to get a sense of the absolute desperation felt by the German people. Desperate people look to simple solutions, and the NSDAP came along with a simple explanation of why the people were suffering, whom to blame, and a programme laying out what needed to be done to fix the solution. I am much less familiar with other genocidal events (Armenia, former Yugoslavia, Rwanda for starters) and so cannot speak to those situations. But I suspect that one would probably find some combination of desperation, poverty, perception of the 'other' as a cause of suffering, and a simplistic populist 'solution' to the problem amounting to the subjugation and eventual expulsion/extermination of the 'other'.
Education alone cannot fix this. It can certainly help and I would suggest it is the best starting point. While it can help address the fear of the 'other', and allow people to gain a more nuanced understanding of a situation that will make them less susceptible to simplistic populist 'cures' for society's ills, education alone will not address the other root causes. Young people in particular have to see a way forward that does not depend on hatred and blame. They need opportunities, they need hope, they need an opportunity to focus on the positives in this wonderful world, and not to focus on a perceived need to apportion blame.
Hmm... I've just realized I've taken a very macro approach to this, but I think the same arguments still apply to individuals as well as larger groups/societies. Deal with fear of the 'other' through education. Deal with desperation and hopelessness by providing opportunity. I think that would go a long way to nipping this in the bud.
On a side note, for anyone interested in the history of the swastika and its original meaning, check out: Manwoman.net
Through a series of events far too long to relate here, my Dad got to know this artist and to say he's an interesting dude would be a serious understatement. But to make a long story short, one of his missions in life is to restore the swastika to its original (i.e. pre-Nazi) meaning. How's that for an uphill battle? :)