So, I think here are tasks for you to make your project run:
1. If you are going to Arduino(which is a good choice for new beginner), you need to run Arduino on your esp first.
https://github.com/espressif/arduino-es ... structions
https://www.arduino.cc/en/Main/FAQ
2. To control the motor, you need to understand how you should control the H bridge.
You can use PWM module to do that. You can find them in Arduino examples.
3. To communicate with your raspberry, you should first know what protocol the raspberry is using.
You can also find communication examples in Arduino IDE.
To run the examples and trying to modify the examples are good ways to start your project.