Legally, and in a very real sense, Finland was not a party to WWII. Stalin wanted a buffer zone between the Soviet Union and Germany and he demanded Finland relinquish the Karelian Isthmus. Finland refused and on Nov. 30 1939 the Soviet Union invaded Finland with a force far greater than the Normandy invasion force.
Finland was able to hold off the Soviets for a considerable time while wrecking devastation on the Red Army.
Eventually superior number of Soviet forces were about to overrun the Finns and Finland sued for peace. This is what is known as the Winter War.
Ultimately, Finland lost the territories but the rest of Finland remained a free constitutional republic (BTW,
the only country in Europe that remained a constitutional republic during the period of the war)
War resumed in June, 1941 when Nazi Germany invaded the Soviet Union. Finland allied itself (informally, without treaty) with Germany in an effort to regain it's lost territory. This is known as the Continuation War. Hitler went to great lengths to keep Finland fighting with them against the Soviets. As Germany was losing the war, and Finland was worn out,
the Finnish government concluded a surrender agreement with the Soviet Union. As part of the agreement
Finland expelled the Germans from Finnish territory.
One of the greatest military leaders of the 20th century that almost no one outside of Finland has ever heard of, was Marshall Carl Gustaf Emil Mannerheim who saw Finland militarily thru this greatest threat to Finland's freedom.
On the civilian side, Risto Rytti, as President of Finland handled things on the political end. Rytti was tried as a war criminal because of his cooperation with Germany (only at the insistence of Stalin) and spent time in prison and due to bad health was finally released.
Both men sacrificed greatly for their country and were true patriots.
The U.S., nor the allies came to the assistance of Finland in it's battles with the Soviet Union because we chose to be allies with Stalin.