I need help with an IR transmitter, receiver, and a DC motor

Since I've been down that road in order to learn how to control my entertainment system via Alexa and the
esp82266, I'll try to save you time by sharing info which took me a few weeks learn.

First, you'll need to know how the 38khz transmitter works - if you don't already. Below is a great depiction:


IR transmitters have a Header MARK, Header SPACE, Bit MARK, a ONE SPACE, a ZERO SPACE; and, relating to TVs, BlueRays, etc - a repeat space so as not to waste time re-transmitting the device ID.

Next, you'll need to know how to manipulate the arduino to pulse the bits on the 38Khz sub-carrier. Below is a comprehensive read:
arduino topic

Using and understanding the above will place you on another path of good study:
Arduino-IR Remote

Hope this sets you on the right path (and limits the invested google time).