Custom ROMs are one of Android's great strengths, but it's also nice to have the ability to modify a device without compromising the upgradability / stability of a stock ROM. This has become a reality of late with the release of the Xposed framework and now famed iOS developer Saurik, of Cydia fame, has released Cydia Substrate for Android, which offers similar functionality.
Requiring root access (like Xposed), Cydia Substrate allows developers to create 'substrate extensions' that are then loaded into processes that they wish to modify. Developers use a provided API to make changes in memory as required, modifying both Java AND native code to their heart's content. :)
Substrate itself is installed via the Play Store, but as it makes changes to your device, you should definitely back up first. There is a nice 'bypass' mode built in whereby holding the volume-up button on your device will disable Substrate.
Extensive documentation on how to create modules is available at CydiaSubstrate website with clear code examples.
I look forward to seeing how Substrate develops and the cool modules we're sure to see going forward! :)
Finally, if you're interested to learn about the differences between Xposed and Substrate, Saurik has a post discussing the two online.