There were two different main types of guns that armies used during the first world war, those were field guns and siege guns. Field guns were smaller calibre and lighter than siege guns so they were much easier to transport in battles, though the siege guns packed a much bigger punch.
The artillery weapons used different shells to fulfil different purposes during warfare and what needed to be done to get an edge upon the enemy. One type of shell that was used in trench warfare was the shrapnel shell, these shells were timed in order to explode in the air over the enemy in the trenches. On detention thousands of small ball bearing fired down upon the enemy both injuring and killing the troops that were not under good enough cover. The explosion was must like a shotgun blast in the sense that it shot outwards. You can see this type of shell in action from this photograph from 1917, it was taken of the Canadian soldiers in a trench on Somme.
Gunners used high explosive shells in order both collapse trenches and protection shelters. The trenches protected well against shrapnel that was fired upon it, however they were still very vulnerable to high explosive shells. These shells were capable of leaving large craters in the battlefield and killing off anyone who was near the site of detonation.
Mortars were one of the most effective yet simple siege weapons that was used during the war. Mortars fired large shells in high trajectory lines in order to plummet down upon the enemy trenches. During the war armies used martyrs with many different types and sizes of ammunition. Their sizes and payloads also differed greatly, siege mortars were used for needs on bigger scales where as infantry mortars could be more easily moved around and carried by a small group of men. Making them more versatile for the needs of trench warfare.
Over the course of the first world war, the sheer number of artillery guns increased greatly. By the midpoint of the war, more guns at higher calibers than had been seen before were being used by the Allied forces which essentially allowed them to have constant firepower on their side. By the year 1918 the allied gunner were able to out gun the German forces and gunners, this allowed the allies to have much better support for the infantry men during attacks and such in the battlefield. The Allied gunners became very specialised with the artillery weaponry and as a result they were able to better locate their enemy and account of other factors such as weather and conditions that could have possibly altered the trajectory of the artillery fire.