How did anarchist economies function for several years? Also can anyone recommend a book about anarchist polities in practice?
I'm going to do my best to answer about Catalonia, but much of my knowledge on this topic comes from Antony Beevor's *The Battle for Spain*, so if anyone has more information, don't hesitate to correct or expand my answer.
One factor that is often ignored is the role that the communist party played in shaping the economy of Catalonia during the Spanish Civil War. The party, which did hold sway in Catalonia, denied any intention of revolution, a stance recommended by Moscow to conceal the party's intentions and draw broader support. Furthering this public message, the communist party did not call for redistribution of land, declaring that "We respect those who want to work their land as a collective, but we also request respect for those who to cultivate their land individually".
In addition, the anarchist factions did not truly maintain control over the Catalonian economy for the duration of the war, and it is widely accepted that around 1937, the communist supported movement for a centralized economy won out.
However, this is not to deny or minimize the role of worker collectives in the Catalonian economy, particularly in the early portion of the war. Catalonia had a long history of cooperative enterprise, and it is estimated that prior to the war, about 100,000 people were involved in cooperatives in Catalonia alone.
Spanish collective were unique from those in the USSR. They were based on the joint ownership of the land and/or factory, but also included formerly private companies jointly controlled by workers and owners.
Something of a myth around collectivization is that it amounted to regression in technique and tools, because of pre-war anarchist resistance to modernization. However, under the anarchist philosophy, this resistance was not because modernization was bad inherently, but because under a non-anarchist structure, that modernization and increased productivity would merely be used to deprive the workers of the fruits of their labor.
As such, once anarchists believed that anarchy, as they saw it, was realized, most communes attempted to modernize, even taking action that would have stoked strikes if enacted by owners pre-war. Members of the Confederacion Nacional del Trabajo (CNT), a group of anarcho-syndicalist unions, shut down hundreds of inefficient workshops, actions that, when attempted by owners pre-war, led to strikes. The woodworking industry in particular was completely reorganized, undergoing vertical integration. These changes were also seen in baking, leather making, heavy industry, and textile.
These efforts were hindered by a few factors however. First, the general effects of the war proved a great hinderance. The peseta, the Spanish currency, lost a great deal of its value with the beginning of the war, such that raw materials cost about 50% more within five months of the outbreak of war. The bank of Spain had ordered a sort of embargo of anarchist produced goods, and the central Republic government frequently withheld credit, foreign exchange, and contracts from anarchist collectives, going so far as to contract the production of uniforms to foreign companies, rather than CNT run collective factories.
In agriculture, anarchist collectives grew quickly. There were two main ways that such collectives were formed.
By modern analysis, the efficiency of these collectives, both industrial and agricultural, was not significantly below that of their pre-war equivalents, once you account for the general disorder and problems that also plagued non collectivized enterprises, not the mention the active opposition that many collectives faced from the Republican establishment.
As a follow-up kind of question, how did anarchist military formations function in those areas? Were they organized in any unusually level or egalitarian way, or did they just go along with a more typical hierarchical structure for simplicity's sake?