The primary goal (that I know of) of the artillery bombardments was to destroy the barbed wire and soften up the enemy defences. This was done through extended shelling of the target area, but what sort of area would actually be under fire during these periods? Were they just aiming at the front lines of the enemy, or were they engaging the supply lines to the front as well? Also, was it the inaccuracy of the aiming during these barrages that caused the shell scarred landscape of no mans land, or was this caused inaccuracies in the gun itself? I'm assuming they weren't aiming at no mans land so why was it so saturated with shell holes?
Artillery tactics in WW1 are a massive study in themselves: Sanders Marble is the best specialist author. I will focus on British artillery methods, the French and Germans had their own ideas, but, loosely, tried most of the same tactics.
At the very beginning, the Royal Artillery was barely trained in indirect fire, and at early battles like Le Cateau and Nery set up in an almost Napoleonic, direct-fire way. The French relied heavily on light artillery used in a broadly similar way, albeit utilising its range. Casualties were heavy.
From late 1914 through 1915, all sides were extremely low on artillery ammunition. They'd fired off their stockpiles but did not have the industrial capacity to meet demand. This meant that while tactics developed very rapidly, the means to carry them out was not always available. However, British commanders quickly looked to artillery to solve the problem of capturing trenches and breaking barbed wire. Observation posts linked by telephone, and spotting by planes came into use.
It is worth considering that in 1915 defences were not as "thick" as they later became. Smashing wire with shells was feasible, extensive trials were carried out. A problem was the use of schrapnel, by necessity. It was a shell type cheaper and easier to produce, but it was less effective than high explosive. The desirability of heavy guns was seen, but they would take another year to arrive in numbers. For the moment lighter 'field artillery' was more common.
At battles like Aubers Ridge and Loos in 1915, the results were frustrating. In areas the wire was broken and the trenches smashed, but getting enough shells, in the right place, to make a penetration across a wide enough front to resist counter attacks, all pointed to the need for longer bombardments.
This brings us to the situation that informed the Battle of the Somme in July 1916, but first a digression.
In February 1916 the Germans attacked Verdun, planning a battle in which artillery would be supreme. The battle started well but French resistance increased, especially as the German artillery struggled to find targets as the front line moved forward. The French marshalled their own heavy artillery and struck back. The battle became a horror show, doomed infantry trying to hold exposed positions as they were incessantly shelled. Places like the Mort Homme saw tens of thousands die in spaces the size of a soccer pitch. Massive concrete fortifications proved vulnerable to super-heavy guns.
Up until now artillery had focussed on front line targets, wire, trenches, emplacements, but through 1916 targeting enemy artillery, 'counter-battery' fire, became common. Co-ordinating artillery and infantry became a consuming objective.
The Somme battle was designed to achieve a breakthrough by demolishing a long section of front with artillery, smashing the wire and the trenches. The Germans planned their defence, to shell no-man's land as the British and French attacked. The French attacked behing a 'creeping barrage', which moved forward slowly but steadily, the infantry following closely. In this way, they could occupy the German trenches before defenders could emerge from their dugouts. The creeping barrage became an important tactic and was used for the rest of the war.
Elsewhere on the first day, the attack was an utter disaster. The German dugouts were deep and safe, the wire poorly cut, and the broad front had the effect of thinning out the artillery to a lower density than many 1915 battles. The high command's insistence on a 'breakthrough' shifted the focus beyond the front line, further diluting the effect. (see Prior and Wilson, The Somme). Many Germans survived to emerge and gun down the advancing British.
As the battle continued for months, both sides smashed the contested areas. It was the firing of thousands of shells at villages and small localities such as Poizieres, Contalmaison, High Wood and Flers that over time produced those utterly desolate landscapes associated with the First World War. Aside from inaccuracy, troops would dig a new trench perhaps 50 metres from the old line, seeking to avoid aimed fire. But soon, the fire would shift to the new location (Lynch, Somme Mud describes such an operation).
The following year, Third Ypres would see the process repeated on an even larger scale. With few alternative weapons, more and more artillery was what armies wanted, and was what Allied factories in particular could provide.
The final year of the war saw big tactical changes. Artillery bombardments were now short but much more intense. Many more tubes fired more rapidly, but for hours rather than days. Generals sought not to pulverise the enemy, but to neutralise him long enough for his position to be captured or out flanked. Artillery did not shell a general front line, but specific points, targeting vulnerable and important locations. Both sides arrived at these ideas independently.
From March 1918 the Western Front became more mobile, and the fields of endless craters became a rarity. Artillery was used with subtlety and precision, defensive positions were increasingly chosen for their safety from observation. Artillery fired at all manner of targets, from front line positions to choke points and supply dumps well behind the front line.
It had all come a long way from 1914.