Buffy actually died twice, though fans have witnessed three on-screen deaths. There's also a debated gunshot moment that some count as a fourth—but let's break it all down.
One: In the season one finale, the Master drowned Buffy during their fight. After he left, Xander and Angel arrived, and Xander revived her with CPR.
Two: In the season five finale, the hell-god Glory opened a portal using the blood of Buffy's sister, Dawn. The only way to close it was through Dawn's death—but Buffy realized they shared the same blood and threw herself into the portal instead, sacrificing her life to save her sister and the world.
Buffy was brought back in the season six premiere by Willow, Xander, Anya, and Tara, using a powerful spell that required the Urn of Osiris—a spell with major repercussions that shaped the entire season.
The Debated Gunshot: Some fans speculate Buffy briefly died on the operating table after being shot by Warren Meers at the end of season six. However, her condition was always described as critical-to-stable, and the writers never signaled a flat-line. The wound was never referenced again, making a third death unlikely. Fittingly, in the musical episode "Once More, With Feeling," she even sings, "It's do or die—hey, I've died twice."
The Death That "Never Happened": Buffy also died at the end of the season three episode "The Wish," but this doesn't count as canon for two reasons. First, it took place in an alternate universe where everyone—including Buffy—was different from the characters we know. Second, the episode was undone by the end, with only a handful of characters (a vampire Willow and Anya) remembering it.
In short: we saw Buffy die three times, but our Buffy only died twice.
Drowned by the Master — S1, "Prophecy Girl"
Neck snapped by the Master — S3, "The Wish"
Killed in Glory's mystical portal — S5, "The Gift"
Shot by Warren Meers — S6, "Seeing Red" (debated; she did not die)