Set in Mexico during the French occupation of that country in the 1860's, Clint Eastwood plays Hogan, a mercenary hired by Mexican revolutionaries to help destroy a French fort. One day, he rescues a woman from being gang-raped by three outlaws. It turns out the woman (Shirley MacLaine) is a nun named Sister Sara. She is a supporter of the Mexican revolution, and she wants to help Hogan on his mission. He agrees to escort her to a revolutionary camp, where he will meet up with a former Mexican colonel and help attack the fort.
During the ride to the camp, Hogan sees Sara behave in ways that are not common to a nun, including smoking cigars and drinking whiskey. She justifies her behavior as church-allowed dispensations. While in the town of Santa Maria, their effort to blow up a supply train is temporarily foiled by Indians when Hogan is shot in the shoulder with an arrow. Sara bandages up Hogan, and they successfully destroy the train. As they continue to ride, the two begin to show feelings towards each other, but Hogan won't act on them because she is a nun.
When the two finally reach the camp, Sara reveals details about the fort (she says it was a former monastery and she used to work there), and Hogan and the colonel come up with a plan. One aspect of the plan is to go through a tunnel that goes from the fort to a home that used to belong to the monsignor. Sara and Hogan go to the house, and it's here that Sara's real identity is revealed. Sara is actually a prostitute, and the former monsignor's home is now the whorehouse where she lives and works. She had been traveling as a nun in order to win support for the revolutionaries, since no one would listen to a hooker.
That night, the revolutionaries attack the fort, with the colonel and some of his men entering it through the tunnel, and Hogan, Sara, and the rest of the men entering through the front gate. The attack is a success, and all of the French troops are killed. Hogan finds the strongbox in the French general's office and takes it as his payment for his involvement in the attack. The movie ends with Hogan and Sara splitting the contents of the strongbox, and the two of them having sex.
Thanks Joseph C!