Hitler got the public to believe what he wanted them to believe, so they agreed with him and supported him.
A little deeper in that all the poverty and violence, and other crimes were blamed on the people he didn't think met the Aryan race. so when people think that their problems are because of a certain group of people then their hate will grow for them then they will be more supportive of their extermination.
He had the people of Germany convinced that it was their destiny to rule the world, because of the superiority of the 'Arian'race. Well everyone wants to be part of The Superior Race so it isn't a difficult idea to sell. The fact that Germany had lost a war was blamed on the Jews and anything else he could vaguely tie into the loss. Genocide was looked upon as a purification process to root out any inferiority in the German population, so that they could focus on creating the perfect society. This is just one of the ideas or propaganda that Hitler circulated to achieve his cause, and to win loyalty of the German people.