The plot revolves about the same two main characters, interconnected by space-time causality and spanning between years 1500, 2000 and 2500; and it keeps coming and going in a somehow confusing, non-linear fashion. This is the most logical way to "poop" it:
In 2000, Izzy (Rachel Weisz) is dying of cancer. Her husband, Dr. Tom Creo (Hugh Jackman), a scientist working on some research about oncology, comes upon an active principle derivated from a certain Central American plant that can seemingly stop the development of cancer and, perhaps, cure it; he and his team try it on an ape, "Donovan". It works; not only Donovan's cancer stops, but it also reverts, and he seems to have stopped aging. This gives Tom the hope and courage to try the substance on Izzy. Sadly, she dies before he does.
Nonetheless, before passing away, she gives him a notebook with a fantastic story, called "The Fountain", which suggests the idea of a mysterious Tree that gives eternal life. Based on this plot point, the film keeps shifting between shots of a Spanish conquistador named Tomás (Hugh Jackman), in year 1500, who, under the command of -and inspired by his admiration to- his Queen, Isabella (Rachel Weisz), sets to find said Tree; and shots of Tom in year 2500, with an aspect of a spiritual entity that has transcended the material stage, and is seen floating over space, inside a bubble which holds a strange-looking tree.
The 1500 Conquistador storyline ends with Tomás facing an indian wizard who seemingly kills him by stabbing him to death; however, the image of the "future Tom" appears, and the wizard surrenders and offers himself in sacrifice. Tomás cuts his throat and approaches to the Tree he had been looking for, which shows in the background; he cuts it open, and a sap flows, which he smears over his wound, curing it; but, when he drinks the sap, a large plant bursts through his wound, and he dissapears under it. It suggests he died.
The 2000 and 2500 Tom storylines are, in fact, a single one. His completion of the empty "Twelfth Chapter" of the story implied that he went on with his researches about stopping cancer and death, but eventually aged and died, not having really been able to find the source of Eternal Life. The spiritual Tom is an allegory of his own death and reunion with his beloved Izzy, to "live with her happily ever after".
Thanks Dr Mat!