Two areas that you could take a look into are Pulse-width Modulation (PWM) and H-bridge drivers.
You can search this forum on h-bridge and pwm and find a number of pre-existing discussions on both topics. You can also google these two terms and find information that is out on the Internet.
Review the material and then you can come back here to pose questions to help you clarify your understanding of these topics.