After the German invasion of Poland from formal point of view France and Great Britain were in a state of war with Nazi Germany (due to the agreements signed by Poland with both countries). But between the September 1939 and May 1940 there was a period of "Phoney War" in which no open hostilities took place (only minor skirmishes, like occasional fighter duels).
France was sure that Germany will not try to invade their territory since it was protected on the border by mighty Maginot Line, but on 5th May 1940 Germany begun the invasion of Belgium and Holland, bypassing the Maginot Line, that lead to invasion of France. The French army (and British Expeditionary Force) were completely taken by surprise and the tactics of blitzkrieg created chaos in their command chains - they were preparing plans for defence, but before they could have been sent to the units the Germans were already behind the planned defence lines.
In 6 weeks Germans took control of Belgium, Holland, forced British Expeditionary Force to be withrawn (famous Dunkirk evacuation) and brought French army to surrender. It was great victory for Germany, especially since Allied forces had advantage in any numbers except for aircrafts involved. British lost a lot of equipment (planes, tanks, guns) leaving it behind while they were retreating to Dunkirk. Over 1,900,000 soldiers were captured by Germans, they have taken the French territory and gained access to English Channel, where they already planned to invade Britain.
During German invasion three French soldiers are cut off from their unit and now have to find a way to cross enemy lines without being detected. With a bit of cleverness and huge shear of luck they are on the way for adventure of their lives.
Chaudard, Pitivier and Tassin are again cut off from their unit, but this time by mistake they end up in castle used by Germans to keep high rank officers and they try to find a way to escape.
French commandant of the camp, where refugees from Nazi Germany are kept, risks a lot to save them from being sent back to Germans, who just invaded France.