After installing an app, the .apk file that was installed can be found in /data/apps/

There are various tools that can be used to unpack and decompile the source code. [1] [2] [3]

I've even seen people who are able to modify the code/data, and rebuild a package that includes their modifications. [1] [2] [3] Alternatively, it's possible to interfere or tweak their run-time behavior in desired ways.