We generalize the forest-fire model of P. Bak et al., which contains a tree nearest growth probability p and fire spreading to the neighbors, by including a lightning probability f and an immunity g which is the probability that a tree catches no fire although one of its neighbors is burning. The model becomes self-organized critical in the limit f/p→0, provided the time scales of tree growth and burning down of forest clusters are separated. The size distribution of forest clusters obeys a power law. We calculate the critical exponents in one dimension. A continuous phase transition is observed in the general forest-fire model when g reaches its critical value. We determine the critical line gC(p) and show that the critical fire propagation represents a new type of percolation. Finally, we point out similarities between the forest-fire model and excitable media, which comprise such different systems as chemical reactions, spreading of diseases and populations, and propagation of electrical activity in neurons.