This is a difficult question, and one which had led to much disagreement among historians. These are some reasons that Hitler was able to rise to power.
First, the end of World War I left Germans bitterly disappointed and angry. The German propaganda machine had tried to persuade most Germans that they were actually winning the war even into 1918, so when they surrendered (without the Allies actually entering Germany's borders) many believed it to be a conspiracy of radicals, or, as it would become known later, a "stab in the back." The Treaty of Versailles made matters worse by imposing harsh punishments on Germany, especially billions of marks in reparations payments.
Second, the economic situation in Germany was dire throughout the postwar period. The reparations and other wartime legacies led to astronomical inflation in Germany, which the postwar Weimar Republic was unable to handle. When the Germans secured more favorable terms for reparations payments, the value of currency began to stabilize, but Germans were hit hard by the Great Depression at the end of the 1920s and into the 30s. So economic turmoil was more or less constant after World War I.
Third, and closely related to economic crisis, was political unrest. Much of the 1920s was a running street battle between far-right (like Hitler's emerging National Socialists) and far-left (like the Communists) political factions. The Weimar government was trapped between, and was extremely unpopular. Many Germans (and others outside Germany) perceived Communists to be the more urgent threat.
Finally, there was Hitler himself. He was a shrewd and ruthless politician who accurately assessed the mood of the German people and the nature of his opponents. He rose to power through a combination of brute force, pandering appeals, and backroom deals. He did so with considerable popular support, as many Germans in the midst of crisis embraced his message of national renewal in spite of (or for millions, because of) the racial nationalism and especially anti-Semitism he espoused.
These are just a few reasons why Hitler was able to rise to power, and there were many more.