Apostrophe: a Figure of speech
Apostrophe is a Figure of speech. It directly addresses an absent person, a dead person, or a non-living thing.
Example: O Death, where is your sting?
Literary Example: "O Captain! My Captain! Our fearful trip is done." – Walt Whitman