Cross platform apps and programing languages...how is it done?
First word: consistent API across platforms - when programming on different platforms, the same API is presented to programmers.

Second word: layered architecture - this hides the low level differences under a consistent layer.