John Donne first wrote the words, "Ask not for whom the bell tolls, it tolls for thee." It is the last part of a longer passage in Mediation XVII of his "Devotions Upon Emergent Occasions."
The passage from which this quote is taken begins with another famous phrase: "No man is an island." It has to do with death and the interconnectedness of humanity. Some believe that it means that each time a person hears a funeral bell, he is that much closer to his own death. Others feel that the meaning is that humanity is all one, and when one person dies, a part of each living person dies as well.
Ernest Hemingway made "for whom the bell tolls" famous when he used the quote as the title of a book that is set during the Spanish Civil War. The entire passage appears in the book's epigraph.