Hi. You need to follow these "macro-steps:
- Unlock your bootloader
- install a recovery
- install a custom rom using the recovery
- enjoy =).
Some models can get rhe bootloader unlocked using a code provided by motorola, and the procedure is described in that webpage.
The recovery can be installed using adb, then, you need to install motorola drivers and adb.
To install a custom ROM, you need to enter into recovery mode and flash ROM and gapps.
Greetings...