A layered stack
Android is built from five layers. Each one relies on the layer below it and hides its details from the layer above.
Linux Kernel
At the bottom, the Linux kernel manages memory, processes, power and security, and holds the drivers for each piece of hardware. Binder, Android's IPC driver, lets processes talk to each other.
Hardware Abstraction Layer
The HAL gives each kind of hardware a standard interface. Device makers implement it for their own chips, so Android works the same on any phone.
Native libraries and ART
Native C/C++ libraries provide fast graphics, media and web rendering. Next to them, the Android Runtime runs each app in its own process and compiles its bytecode into machine code.
Java API Framework
The framework turns everything below into Java and Kotlin APIs: managers for activities, windows, notifications and data, and the view system for building interfaces.
Apps
At the top are the apps. Built-in apps and yours use exactly the same APIs, and all of them run on ART.
Taking a photo
A photo request travels down the stack: the app calls the Camera API, which reaches the native camera service over Binder, then the Camera HAL, and finally the camera driver.