Short, simple explanation - Spain had been unstable for many years when in 1931 King Alfonso XIII abdicated in order to give a Republican Government a chance. Goverrnments came and went, until a moderate left coalation was elected in 1936.
The Right Wing - Conservatives, Army and Catholic Church wouldn't accept this and the country spiralled into chaos and became ungovernable.
Inevitably senior army officers mounted a coup, the Government dithered and failed to arm its supporters, (Marxist and Anarchist Trade Unions), who would have nipped the rebellion in the bud.
Civil War ensued with the Army steadily gaining control by systematically murdering its opponents after each victory.
After victory in Madrid General Franco, who though sympathetic towards them, wasn't one the original plotters, made himself Head of State,and remained so until his death Nov. 1975, (the evil, murdering *******!).