Short answer
The first battle in which tanks were used was the Battle of Flers-Courcelette, which began on 15 September 1916. It was part of the British offensive on the Somme in France, and the tanks were British. Tanks were sent in to support the infantry as they attacked German positions.
The setting: the Somme
By 1916 the Western Front had settled into long lines of trenches, protected by barbed wire and machine guns. Attacks had produced heavy casualties with little ground gained. The Somme offensive was meant to break that pattern, and the tanks were one of the new weapons brought to the fight.
Flers-Courcelette took its name from two villages on the Somme front. The British and Dominion forces attacked there to take ground the German army still held.
The tanks used
The tanks at Flers-Courcelette were early models, mostly the Mark I. They were built and crewed by the Heavy Section of the Machine Gun Corps, the unit formed in 1916 to operate them. Mark I tanks were large, slow and cramped, with a crew working in a hot, noisy interior. Some carried light guns, and others carried machine guns.
How they performed
The tanks helped some infantry advance, but many broke down or got stuck in the mud and shell craters before they reached the German lines. Their effect on the wider battle was mixed. The gains were smaller than the planners had hoped, and the tanks could not move through the ground as easily as the attack required.
Even so, the tanks showed that armored vehicles could move with infantry and cross wire and trenches.
Why it mattered
Flers-Courcelette was the first combat use of tanks, and it set the pattern for what followed. The lessons about reliability, speed and crew conditions fed into later designs. The tank units became a separate Tank Corps in 1917, and the first large-scale tank attack followed at Cambrai in November 1917.
For a fuller picture of the early tanks and the fighting that followed, the wider history of the Royal Tank Regiment is a useful next step.