It’s a long story, and there’s actually a book out on the subject. But here’s a link to The Atlantic’s short version of the comprehensive history of Leonard Cohen’s best known song (with videos!).
Leonard Cohen’s original:
Jeff Buckley’s version:
and my favorite, sung by k.d. lang: