My history teacher told us that the reasons that world war 2 started are found in the ending of world war 1. I know the treaty of versailles was a huge punishment for Germany and this is, according to my teacher, 1 of the main reasons why World war 2 started. My question is, how did Germany manage to build such a strong economy, raise a strong army that again can start a world war despite all the economical repercussions it was facing because of the treaty. With all the financial compensations it had to do to neighbouring countries i can't really wrap my mind around the fact that they got so strong economically in only 15-20 years to start another world war.
There are already several great posts in the FAQ that deal with the topic of Nazi economics and the financing of the rearmament in defiance of the treaty of Versailles. I would start with:
"How did the Nazis monetarily fund their military and how was it sizable enough to take on so many large countries?" by /u/vonadler
"How did Germany fund their rise out of the depression following WWI, let alone an army to fight in WWII?" by /u/Caherdaniel
Both questions deal with the exact question you're asking. Both are good.
There is however one thing I take issue with in your teacher's narrative. "...the treaty of versailles was a huge punishment for Germany and this is, according to my teacher, 1 of the main reasons why World war 2 started..."
This narrative makes it sound like war was inevitable because of the Treaty of Versailles. This is, in my opinion, not the case and an attempt to shift the blame for WW2 to the victors of WW1. Yes, the terms of the treaty of versailles were needlessly harsh and laid the foundation of a second war, but, and this is important. Everyone knew that. By the mid 1930's renegotiations of the treaty were already under way. I highly recommend Philip Bell's The Origins of the Second World War in Europe if you want a deeper understanding of the events that led up to WW2. It demonstrates quite clearly that the Nazi regime had no interest in continuing down a peaceful path of renegotiation, the decision to go to war was in their hands and it was a decision that enjoyed wide popular support in Germany.