Recovering after devastating natural disasters

How do societies recover after devastating natural disasters and/or acts of terrorism/war?