Putting a DC voltage on a brush motor with polarity opposite what the motor would generate itself is called "plugging". It will cause the motor to consume current in excess of its stall current (up to 2x), but it will stop the motor faster than would dynamic braking. Indeed, the torque trying to stop the motor may be twice the motor's starting torque. All of the electricity fed into a motor under such circumstances will be turned into heat (which could cause overheating if one isn't careful); further, the extreme torque may damage whatever the motor is connected to. Nonetheless, if one really needs to stop a system instantly, plugging is a way to do it.
Things are a bit different with AC, however. If one drives a motor with an AC signal which is connected to a battery in "forward" polarity some fraction of the time and in "reverse" polarity the remainder of the time, and if the frequency is high enough the motor current doesn't have time to change much during each cycle (due to the motor's inductance), one may by varying the "forward" duty cycle control the motor speed to be anywhere from forward full to reverse full. Three really nice things about this control approach:
-1- Its behavior is relatively linear; for example, driving the motor 75% forward 25% reverse will make its no-load speed be about 50% of its forward no-load speed.
-2- If one is willing to drive the motor with less than its maximum stall current for a given supply voltage, the supply current will be reduced proportional to the square of the current one does use. For example, if one is willing to settle for half the stall current, supply current while starting will be reduced by 75%. If one only needs a third of maximum stall current, supply current can be reduced by almost 90%.
-3- Provided that one tries to drive the motor at some speed in its direction of motion, it will automatically perform regenerative braking (maximum regeneration power can be achieved by driving the motor at a speed half its current speed; maximum efficiency can be achieved by slowing down the motor as gradually as is tolerable).
The amount of power a motor will waste as resistive heat is proportional to the square of the torque it's generating, which is in turn proportional to the difference between the motor's present speed and its "requested" speed. Although trying to switch motor polarity many thousands of times per second may incur some switching losses, trying to keep the requested speed close to the actual speed can help achieve some very good efficiency.