From an ideological point of view, why do nazis and communists hate each other?
If by "communist", you mean "Marxist Communism", then the reason why they despise each other is simple.
The communist genuinely believes that the ideal arrangement is where the society is self-governing, and all property is innately communal and shared. I can enter your house, you need not worry about my taking anything, and even if I did, I am just borrowing it and will bring it back reliably-- etc. Dwarves in DF are innately communist in this respect. The clothier makes clothes, and everyone benefits, et al.
The Nazi on the other hand, is a very specific form of aggressive national socialist, who places the group identity above all other things, including any such notions of things like individual need, want, or concern. The need/decree of the state is final. Rather than property being communal, where all are "owners of everything", the government owns everything, and the people own nothing, and are powerless. These principles are directly at odds with each other. The marxist credo is "Seize the means of production!", eg, seize the reigns of power, and govern yourselves as a community of people, empowered to supply for yourselves, and not beholden or enslaved by others. The nazi politic on the other hand, is "The state over all!", eg, all are subjects of the nation, and have no power to exert.
The confusion comes from the grim reality that the correct definition of communism (the marxist kind), is not attainable at large scales because of human greed, and the inability of people to collectivize in large groups. This requires a central power structure to enforce the collectivism, which then is essentially the same as the state owning everything, as the state has the final say over who has access to what, when, and where-- functionally the same as the Nazi paradigm.