The Buddha explains what causes the hindrances to arise and how to abandon them.

Nīvaraṇappahāna vagga - The Chapter On The Abandoning Of The Hindrances

1.11

"Bhikkhus, I do not see any other single quality that causes unarisen sensual desire to arise, or arisen sensual desire to increase and expand, as a beautiful mental image. Bhikkhus, when one does not wisely attend to the sign of the beautiful, unarisen sensual desire arises, and arisen sensual desire increases and expands."

First.

1.12

"Bhikkhus, I do not see any other single quality that causes unarisen ill-will to arise, or arisen ill-will to increase and expand, as an aversive mental image. Bhikkhus, when one does not wisely attend to the sign of resistance, unarisen ill-will arises, and arisen ill-will increases and expands."

Second.

1.13

"Bhikkhus, I do not see any other single quality that causes unarisen dullness and drowsiness to arise, or arisen dullness and drowsiness to increase and expand, as dissatisfaction, laziness, yawning, drowsiness after eating, and sluggishness of mind. Bhikkhus, when the mind is sluggish, unarisen dullness and drowsiness arises, and arisen dullness and drowsiness increases and expands."

Third.

1.14

"Bhikkhus, I do not see any other single quality that causes unarisen restlessness and worry to arise, or arisen restlessness and worry to increase and expand, as an unsettled mind. Bhikkhus, when the mind is unsettled, unarisen restlessness and worry arises, and arisen restlessness and worry increases and expands."

Fourth.

1.15

"Bhikkhus, I do not see any other single quality that causes unarisen doubt to arise, or arisen doubt to increase and expand, as unwise attention. Bhikkhus, when one does not wisely attend, unarisen doubt arises, and arisen doubt increases and expands."

Fifth.

1.16

"Bhikkhus, I do not see any other single quality that prevents unarisen sensual desire from arising, or causes arisen sensual desire to be abandoned, as an unattractive mental image. Bhikkhus, when one wisely attends to the sign of the unattractive, unarisen sensual desire does not arise, and arisen sensual desire is abandoned."

Sixth.

1.17

"Bhikkhus, I do not see any other single quality that prevents unarisen ill-will from arising, or causes arisen ill-will to be abandoned, as the release of mind through loving-kindness. Bhikkhus, when one wisely attends to the release of mind through loving-kindness, unarisen ill-will does not arise, and arisen ill-will is abandoned."

Seventh.

1.18

"Bhikkhus, I do not see any other single quality that prevents unarisen dullness and drowsiness from arising, or causes arisen dullness and drowsiness to be abandoned, as arousing energy, principle of endurance, and continuous effort. Bhikkhus, when one is energetic, unarisen dullness and drowsiness do not arise, and arisen dullness and drowsiness are abandoned."

Eighth.

1.19

"Bhikkhus, I do not see any other single quality that prevents unarisen restlessness and worry from arising, or causes arisen restlessness and worry to be abandoned, as settling of the mind. Bhikkhus, when the mind is settled, unarisen restlessness and worry do not arise, and arisen restlessness and worry are abandoned."

Ninth.

1.20

"Bhikkhus, I do not see any other single quality that prevents unarisen doubt from arising, or causes arisen doubt to be abandoned, as wise attention. Bhikkhus, when one wisely attends, unarisen doubt does not arise, and arisen doubt is abandoned."

Tenth.