While the Fellowship rests at Caras Galadon, Galadriel invites Sam and Frodo to look into her mirror--a basin filled with clear water that can show the viewer glimpses of scenes far away in time and space. While the hobbits see the Mirror as elven magic, Galadriel does not understand that concept of it; to her it is an artifact of her people. It can help clarify, but is "dangerous as a guide of deeds," for those who turn from their appointed path to try and ensure that their visions happen can bring ruin. Sam sees the destruction of the Shire and his Gaffer turned out of Bagshot Row when he looks, and more ominously, a foreshadowing of the hobbits' encounter with Shelob. He is badly affected--for a brief time he is tempted to abandon the Quest and Frodo and return home. But he masters himself, declaring "I wish I had never come here, and I don't want to see no more magic." Frodo sees Gandalf and Bilbo, and visions out of history, as well as a brief glimpse of Aragorn and the corsairs and the battle at Minas Tirith. Then in horror he sees the Great Eye, and knows it to be seeking him, and that for now the Ring is hidden only by his faltering will. His hopeless response is to offer the burden to Galadriel, but when she refuses the Ring, he realizes he must complete the Quest to prevent the utter ruin the Mirror has shown him. Thus the Mirror becomes both a tool to test the steadfastness of those who look in it, and a strength to their resolve. One can only wonder--what would Boromir have seen in the Mirror, and would it have made any difference to him? Or to the Quest? Perhaps it would have been so, and that it why he was not invited to look.
The Phial that Galadriel gives to Frodo as his parting gift from Lorien contains water from the basin--water which reflects the light of Earendil's star. Like the Mirror itself, the light of the Phial serves to strengthen resolve and courage.