Generation of '98
The background is the loss of the last remnants of the old Spanish empire, with the war of Cuba against the US. Although the loss itself wasn't that significant (the empire was long gone and the gold age was a thing of the past) it was seen as a symbol of the end of the good times and of the uncertainty of the times to come.
There isn't complete agreement about all the authors who comprised the generation, but these are for sure: Azorin (a nickname) was the first to use the term in regard to himself and his companions. Miguel de Unamuno and Pio Baroja were very representative of the spirit, but they denied that there was any meaningful unity in style. Others include R. M. del Valle Inclan, Ramiro de Maeztu, Antonio Machado. There are more, but these are the main ones.
The overall tone is pessimistic, nostalgic and disappointed, and somewhat influenced by Nietzsche. They all knew each other personally, and most of them had a soft spot for Castile which showed in their writing. A worry about the future 'where is this country going?' is ubiquitous in all their works but isn't expressed in a explicit or analytic way.
Unamuno's works are influenced by existentialism and Kierkegaard, and several of them concern religion from a cynical yet struggling point of view. Several of Baroja's works are autobiographical in essence, and they show common people, and losers. Azorin was an explorer of style, and talks about people and places in a nostalgic and descriptive way. Valle-Inclan was a narrator of the absurd, and wrote plays which took the most grotesque side of the most common situations. Machado was a poet of Castilian themes, being viewed by some people as the poetic version of Azorin's prose.