If the voltage supplied to the motor is reversed, that is called plug reversing, or plug braking if the reverse voltage is removed before the motor actually reverses. If the power supply will accept reverse current, energy from the rotating mass will be returned to the power supply. If the power supply will accept the energy, but not control it, a high current will flow and a high braking torque will be produced. That will likely be bad for the health of the motor.
With electronically-controlled motors, the controller may contain a braking resistor that dissipates braking energy. If energy is supplied from the supply during braking, at least part of that energy may be dissipated in the braking resistors. That is also an undesirable situation.
Neither of the above two braking schemes are really good design approaches, but plug braking can be implemented inexpensively with motors that are not electronically controlled, so if it can be implemented without harming the motor, it might not be a bad scheme.
The torque vs. speed diagram below illustrates plug-reverse braking. At steady-state, a motor operates at the intersection of the motor's torque vs. speed capability curve and the load's torque vs speed demand curve, point 1 on the diagram. When the motor is reversed by swapping the voltage polarity of the armature power supply, the resulting torque vs speed curve as a reverse motoring curve that is the red curve rotated about the origin by 180 degrees to the negative speed and negative torque quadrant. It is then extended through the positive speed, negative torque quadrant and shown as the orange curve in that quadrant.
Since the speed and direction have not changed, the operating point moves from point 1 on the original motor curve to point 2 on the new motor curve. However that not a stable operating point because it doesn't intersect the load curve. That intersection is in the negative speed, negative torque quadrant. Therefore motor brakes the load moving the operating point along the orange curve to point three. There we assume that the motor is stopped. If the motor is not stopped, it will accelerate in the reverse direction into the negative speed and negative torque quadrant.
Note that the load torque adds to the torque generated by the motor when decelerating the load.