World War 2 began in 1939 and lasted six years, till 1945. There were two main powers; Allied (countries such as the United States, United Kingdom, Russia and China) and Axis (countries such as Germany, Japan and Italy). It involved more than 30 countries and caused over 24 million military and 49 million civilian deaths.
Trench Warfare was not used as frequently in World War 2 by either main powers. Mobile assaults were becoming much more common to prevent the stalemate of Trench Warfare in World War 1. Armies would attack using infantry, artillery, armour and aircraft cooperating closely to create confusion and increase mobility. Trenches were still used for boundaries and creating a line of defense but because of mobile attacks, they were not an efficient defensive option as in World War 1.
Lightning Warfare
Blitzkrieg involved mobile tanks and infantry working in unison
Lightning Warfare refers to the use of mobility to prevent the Trench Warfare deadlock in World War 1. Known by the Germans as 'Blitzkrieg', it was originally used by them (Germans) in Poland, in 1939.
Blitzkrieg was designed to create disorganisation among enemy forces by using large mobile formations of tanks, infantry and aircraft directed by radio, for precise and coordinated attacks. The German's adopted the technique and successfully invaded many countries, but the British and French still relied on old World War 1 tactics.
Lightning Warfare was highly effective and could easily destroy the British and French infantry regiments. Since Britain and France relied upon their infantry, they were severely pushed back by German forces. The British and French wouldn't adopt the new nature of warfare and were lucky that Adolf Hitler's changes caused Germany to start losing the war, otherwise the much more effective Lightning Warfare would've have easily defeated the their (British and French) forces.