Final solution was a plan devised by the hierarchy of the Nazi party to eliminate the jews from the world. There was already huge antisemitic views in Germany but as the Wermacht (unified army) made advances.
More land was conquered. Jews were isolated out of German life with Nuremberg laws and various other racist measures. It was first suggested to deport them to Madagascar. But that was not practical and not logistically possible.
It was suggested to send them to Palestine, but eventually that failed with the help of the grand mufti of Jerusalem .
In 1941 at the invasion of the Soviet union. There were a group of men which were killing squads that were behind the Wermacht killing Jews wherever they found them. Then mass graves appeared as time went on.
It was not only until the same year that Hermann Goring wrote to Reinhard Heydrich to find a permanent solution to the Jewish question. A meeting in wannsee in Germany with Heydrich chairing it came to conclusion that all parties to work together to achieve the goal.
The final solution was fully in place by 1942.