DC Motor scenario
A simple DC controller connected to the batteries and the DC motor.
If the driver floors the accelerator pedal, the controller delivers the full 96 volts from the batteries to the motor.
If the driver take his/her foot off the accelerator, the controller delivers zero volts to the motor.
For any setting in between, the controller "chops" the 96 volts thousands of times per second to create an average voltage somewhere between 0 and 96 volts.
The controller takes power from the batteries and delivers it to the motor. The accelerator pedal hooks to a pair of potentiometers (variable resistors), and
these potentiometers provide the signal that tells the controller how much power it is supposed to deliver.
The controller can deliver zero power (when the car is stopped), full power (when the driver floors the accelerator pedal), or any power level in between.
AC motor scenario
In an AC controller, the job is a little more complicated, but it is the same idea. The controller creates three pseudo-sine waves. It does this by taking the DC voltage from the batteries and pulsing it on and off. In an AC controller, there is the additional need to reverse the polarity of the voltage 60 times a second. Therefore, you actually need six sets of transistors in an AC controller, while you need only one set in a DC controller. In the AC controller, for each phase you need one set of transistors to pulse the voltage and another set to reverse the polarity.
You replicate that three times for the three phases -- six total sets of transistors.