What wars was Finland a part of?

In 1939, Germany invaded Poland, which triggered the start of World War II. While France and England were focused on fighting Germany (and ironically did very little actual fighting until May 1940), the Soviet Union began quietly invading countries in eastern Europe with Germany's permission.
One of the countries invaded by the Soviet Union was Finland. The Soviets wanted to take control of at least the area around Leningrad (now St. Petersburg, Russia), although ideally they wanted to conquer most/all of Finland. The invasion became known as the Winter War. The war was short and very bloody- the Soviet Red Army was huge and powerful, but the Finnish troops were better led and fought very well. The Soviets suffered heavy casualties but eventually won, and took control of the territory around Leningrad that they had sought.

Later, during World War II, the Germans betrayed the Soviets and launched a massive invasion, called Operation Barbarossa. Finland, still angry over their loss in the Winter War, agreed to help the Germans. Finnish troops even fought on the side of Germany, although Finland and Germany were never technically allies. The Finnish called this the "Continuation War".

The Continuation War also ended in failure for Finland. In September 1944, Finland made peace with the Soviets, at great cost. One of the conditions of the peace was that Finland had to force German troops to leave Finland immediately; when Finland did so, the Germans did not immediately evacuate. This led to a small war between Germany and Finland called the Lapland War (Lapland is a region in northern Finland that Germany had partially occupied). The Lapland War only really lasted a month or so, but no peace was achieved until April 1945, when Germany finally had to evacuate their troops (and Germany surrendered, ending World War II in Europe, a few days later).