learnt the dual H_BRIDGE ,where a h bridge is used to control the direction of an individual dc moto the gates of the mosfets are given an PWM-signal which decides the amount of current that flows through the dc motors which indeed decides the rotation speed of the dc motors.L298N has two H-BRIDGES which can be used to drive two dc motors at a time.the image of an L298N DRIVER MODULE can be seen at: