In depictions of the Spanish Civil war I always see this hat. I know it has something to do with Anarchist Catalonia and it was worn there as a symbol, but what is it called? I’ve never seen it until learning about it
It seems, after doing a quick search, this is a Republican Officer Side Cap. If you search for this on Google, you'll see very similar images. Note that there's going to be many sites trying to sell you these caps so I'm not going to link directly to it.
It's important to note that the nationalist officers also had very similar side caps, in fact these hats aren't very rare things in most (modern) militaries at all. Even the Belgian police has their own, similarly looking hat though of course these things vary in looks depending on time and place.
Link: https://static.timesofisrael.com/www/uploads/2016/03/000_ARP4380299.jpg
My grandfather actually had a side cap from serving in the Belgian army so I've seen these up close. If you'd like to do a broader search to find hats like these, just searching for 'side cap' will do the trick.
The reason I'm saying this is from a Republican is because you are referring to Anarchists specifically when using this picture. During the civil war, the "Left" side consisted of unions, communists, anarchists, workers, and peasants. While on the other, "right" side we had the Nationalists which consisted of the bourgeoisie, the landlords, and, generally, the upper classes in society.
If you're interested in finding out more about the specific side caps used in the Spanish civil war, though, I reccommend searching for gorro de cuartel – as gorrillo, gorra, chapiri or platano. I hope this answered your question!