Occasional heartburn can be triggered or worsened by eating spicy foods, and it can be completely eliminated by staying away from these foods.