I've seen in some applications that were written in compiled languages where plug-ins are accepted and the solution to the question of how still eludes me. For example in Eclipse, Google Chrome, Firefox, and IntelliJ developers can write plug-ins for the software and it runs as though it was apart of the program.
From my basic understanding, a program's code can't be altered after it's been compiled. So it begs the question, how is it that some Desktop and Mobile applications are accept plug-ins written by other developers after the program has been compiled?
What's the architecture behind it and how do developers check for malicious code and other mishaps?