the example there is almost exactly what you want.
just need to change it to:
public class ExampleClass : MonoBehaviour {
void OnTriggerEnter(Collider other) {
if (other.gameObject.tag == "Player"){
Destroy(gameObject);
}
}
}