In general, the Final Solution evolved from an unorganized, generally anti-Semitic set of tendencies to a very organized program of genocide.
At first, there was no real thought put towards systematically exterminating Jews. The Nazis were content to let them leave the country (especially if they left their property behind).
The move towards a Final Solution started after the war began. At first, the killing of Jews was conducted mostly against Jewish populations in Eastern Europe. These were conducted by Army groups called Einsatzgruppen. But these killings (by shooting) were inefficient and too stressful on many of the soldiers. From there, the Nazis "innovated" new ways to kill Jews in massive numbers and the extermination camps were created.