As mention in Android Architecture Diagram the android has most of libraries that using java Native Interface(JNI) to be able to call the native(c/c++) in Linux kernel so when you write code to call the camera the your java code call some function in libraries section called media framework that deal with the hardware and open camera for you and manipulating with it , and here the some hierarchy for explaining the idea :
Android Application | Android Application | Java Native Interface | C/C++ Native Libraries
feed me back in any component is not obvious for you