The H-bridge is a typical DC motor control circuit. It is named "H-bridge" because its circuit shape resembles the letter "H". Four transistors form the four vertical legs of H, and the motor is the crossbar in H.
The working principle of the H-bridge is to change the current direction by altering the switching states of the four transistors, thereby achieving functions such as forward rotation, reverse rotation, and stop of the DC motor. Additionally,

The working principle of H-bridge circuit (Image source: Internet
Forward rotation: When Q1 and Q4 are on, the current passes through Q1, M, and Q4 in sequence, and the motor rotates forward.
H-bridge current path - forward rotation (Image source: Chip Specification Sheet
Reverse rotation: When Q2 and Q3 are on, the current passes through Q3, M, and Q2 in sequence, causing the motor to reverse.
H-bridge current path - Reversal (Image source: Chip Specification Sheet)
Stop: When Q1 and Q3 are on and Q2 and Q4 are off, or when Q2 and Q4 are on and Q1 and Q3 are off, the DC motor does not rotate. Moreover, due to the reverse electromotive force generated by the short circuit, the inertial rotation of the motor is suppressed.
When Q1 and Q2 are on, or Q3 and Q4 are on, a direct power short circuit is formed, which will burn out the power supply.
When Q1, Q2, Q3 and Q4 are all disconnected, the motor is in an inertial motion state.