Cavalry were obviously active in 1914 before trench warfare really took hold, and again in the 100 days of 1918, but what did they do in between during periods of trench warfare when infantry assaults were mostly the norm?
^ this answer I've given should be pertinent.
but what did they do in between during periods of trench warfare when infantry assaults were mostly the norm?
Between 1915 and 1918, there was still some use of cavalry in combat on the Western Front, and the BEF (largely at the behest of Field Marshal Haig) sought to incorporate the British Cavalry into their plan of attack.
When not being held ready for an offensive, the British Cavalry divisions were often used for traffic/military policing duties behind the lines, or were dismounted and used to hold sections of the front.
The Battle of the Somme saw a number of occasions in which cavalry was used, largely with success. The attack on High Wood by the Hyderabad and Secunderabad cavalry during Bazentin Ridge is the best example. A squadron of Yeoman Cavalry helped to capture the village of Gueudecourt 'at the gallop' during the Battle of Morval in September, and French Cavalry units screened the advance of French units on the Flaucourt Plateau in the first two/two and a half weeks of July.
1917 saw a number of cavalry actions during the German withdrawal to the Hindenburg Line, and the capture of Monchy-le-Preux by the Scots Dragoons during the opening of the Arras offensive. The Cavalry Corps was then held in reserve for the Flanders Offensive (Third Ypres), though some Yeomanry Cavalry did screen the advance of British units at the opening of the Offensive, the Battle of Pilckem Ridge. At the end of the year, British Cavalry units again saw intense action in the abortive breakthrough battle at Cambrai.
David Kenyon and Stephen Badsey's theses on the British Cavalry in the late 19th century and in WWI are extremely informative, and do much to debunk many of the myths surrounding the British Cavalry, and Cavalry in general, in WWI.
Badsey's [thesis] (https://www.repository.cam.ac.uk/bitstream/handle/1810/244878/Badsey12201.pdf?sequence=1&isAllowed=y)
Kenyon's [thesis] (https://dspace.lib.cranfield.ac.uk/bitstream/1826/3032/1/D%20Kenyon%20Thesis%20corrected.pdf)