Although they are powerful, vampires have many weaknesses.
Vampires are (for lack a of better word) allergic to wood, sunlight, and most Christian holy items. They also can be killed by fire and decapatiations. They effect a vampire the same way they effect humans.
When a vampire is killed, it turns to ash and dust. There isn't really any reason behind this, in traditional vampire movies, this would be because old vampires would refert to how the body would be after years of decay. However, on Buffy, young vampires turn to dust too. It's just something that happens.
Vampires are the least allergic to wood, skin contact doesn't hurt, but a wooden stake to the heart will kill. Getting stabbed by wood is also incredibly painfull.
Vampires are extremely allergic to sunlight, they will often be consumed in flames after a few seconds of direct contact, this fire will kill them, turning them to dust.
Holy items are like fire to vampires, they have a natural urge to back away from them, they can burn, and even kill. For more information, see here.
Metal will not kill a vampire (unless used to decapitate.) The reason a sword or bullets can hurt a vampire is because the body still has nerve endings, even though metal can not kill a vampire, they still feel the pain.