How did one impact the other not just in US scenario but in global terms.
This is a HUGE topic. I'll try my best to give a comprehensive summary.
I'll start with the end of WWI. The Treaty of Versailles was signed on June 28, 1919. This treaty ended the state of war between Germany and the Allied Powers (US, France, Britain). Each of the Allied Powers had their own aims for the Treaty of Versailles. I'll briefly outline them:
So, the results of the Treaty of Versailles was a demilitarized Germany and a Germany that had to pay 132 billion Marks ($442 billion in today's money) in reparations. This caused a HUGE stress on the Germany economy and with the world's economy drained by a 4 year war, the Great Depression started.
The economic troubles of the 1930s were worldwide in scope and effect. Economic instability led to political instability in many parts of the world. Political chaos, in turn, gave rise to dictatorial regimes such as Adolf Hitler's in Germany and the military's in Japan. (Totalitarian regimes in the Soviet Union and Italy predated the depression.) Also, the terms of the Treaty of Versailles left a sour taste in Germany's mouth. In come the Nazis. They campaigned on the idea of bringing Germany back to her glorious self. They wanted to undo the humiliation of the Treaty of Versailles. They started militarizing and occupying areas that were forbidden by the Treaty of Versailles (the Rhineland). Germany and Russia sign a non-aggression pact, Germany invades Poland on false pretenses, Britain tells Germany to cease military operations, they don't, and WWII starts. (There's obviously more to this, but your question asks how WWII is related to WWI and the Great Depression).