In this paper, we study the Darboux transformation of the Darboux-Treibich-Verdier equation. On the basis of this transformation, we construct a generalization of the Darboux transformation to the case of the Heun equation and to other linear ordinary differential equations of second order. Examples are given.