Use FME from SAFE software
Or open the KML in ArcGIS and export it to the desired format.
Do you have multiple KML files or layers then consider FME or ModelBuilder or right click in Toolbox on the KML to Layer tool (Conversion Tools > From KML)
Esri doesn't publish their code, but as indicated if your dev language can access the tools in ArcToolbox, then you can do the conversion.
Also, you have posted in the top thread of the Developer Place...there are three main branches there so answers are best directed to one of those branches
GIS Developers or
so all answers will depend upon where you question should be.