An apostrophe in writing is when you want to talk to a non–existent entity in a poem, like death, love, the moon, etc. We often use apostrophes to create a more conversational style. Just remember: you can‘t really talk to death, so don‘t get your hopes up! It’s almost exclusively used in writing poetry.
A few famous examples are John Donne‘s “Death, be not proud“ and William Wordsworth‘s “Ode to the West Wind.”