Candide is a young man living a sheltered life in the Eden like castle of a wealthy Baron, and mentored in philosophies of optimism. His idyllic existence is suddenly turned upside down when he is evicted from the castle for a minor sexual infraction with the Baron's daughter.
From there he experiences great hardships, from being captured, tortured and forced into military service to piracy, storms, disease, mutilations, earthquakes and other disasters.
His preoccupation with good and evil on the world stage, as a result of his lecturing in the philosophy of optimism, is eventually rejected after considering his experiences. In the end it is replaced with a simpler, zen like focus on life with a mantra of "We must cultivate our garden".