In the middle is the KML class, which encapsulates all functions done with and on KML files.
On the left and right side are GDAL (the raster part) and OGR (the vector part). Both use the KML class to read and write their data.