Question: how does elena leave the vampire diaries?
Answer: In the finale of the sixth season, Kai linked Elena to Bonnie's life by magic. Elena will only wake up when Bonnie dies in around 60 years. She was locked inside the Salvatore tomb, then relocated to a warehouse in Brooklyn, New York in the seventh season, then back to Mystic Falls.