Instructions
Understand the difference between the two main types of electric engines. There are brush motors, which have a rotating brush in them to help the function of the motor. There is also a brushless motor which requires almost no maintenance and can be run hard until it breaks, which is when you simply replace it.
Purchase electric engine cleaner. It is available at most hobby stores, and anywhere else that has a good selection of RC vehicles and accessories. It's packaged similarly to WD-40 and comes with a straw. Attach the straw and spray/blow it into the engine compartment. This will blow out all the dust, something that should be done after every race.
Use the correct pinion set up. This is important to the life of the motor. Regardless, or whether your electric engine is brushless or not, you need to use the correct pinion for the current application. Use a slow speed pinion for just general and light use and the high speed pinion for racing.
Keep the electric engine clean and inspect the parts regularly. You will likely need to replace the brushes and springs along the way. It is fairly inexpensive to do and all the parts can be found at any hobby or RC car store.