This is a 1914 fantasy novel by Edgar Rice Burroughs, the first in his series about the fictional "hollow earth" land of Pellucidar.
The author relates how, traveling in the Sahara desert, he has encountered a remarkable vehicle and its pilot, David Innes, a man with a remarkable story to tell.
David is a mining heir who finances the experimental "iron mole," an excavating vehicle designed by his elderly inventor friend Abner Perry. In a test run, they discover the vehicle cannot be turned, and it burrows 500 miles into the Earth's crust, emerging into the unknown interior world of Pellucidar. In Burroughs' concept, the Earth is a hollow shell with Pellucidar as the internal surface of that shell.
Pellucidar is inhabited by prehistoric creatures of all geological eras, and dominated by the Mahars, a species of flying reptile both intelligent and civilized, but which enslaves and preys on the local stone-age humans. Innes and Perry are captured by the Mahars' ape-like Sagoth servants and taken with other human captives to the chief Mahar city of Phutra. Among their fellow captives are the brave Ghak, the Hairy One, from the country of Sari, the shifty Hooja the Sly One and the lovely Dian the Beautiful of Amoz.
David, attracted to Dian, defends her against the unwanted attentions of Hooja, but due to his ignorance of local customs she assumes he wants her as a slave, not a friend or lover, and subsequently snubs him. Only later, after Hooja slips their captors in a dark tunnel and forces Dian to leave with him, does David learn from Ghak the cause of the misunderstanding.
In Phutra the captives become slaves, and the two surface worlders learn more of Pellucidar and Mahar society. The Mahars are all female, reproducing parthogenetically by means of a closely guarded "Great Secret" contained in a Mahar book. David learns that they also feast on selected human captives in a secret ritual. In a disturbance, David manages to escape Phutra, becomes lost, and experiences a number of adventures before sneaking back into the city. Rejoining Abner, he finds the latter did not even realize he was gone, and the two discover that time in Pellucidar, in the absence of objective means to measure it, is a subjective thing, experienced by different people at different rates.
Obsessed with righting the wrong he has unwittingly done Dian, David escapes again and eventually finds and wins her by defeating the malevolent Jubal the Ugly One, another unwanted suitor. David makes amends, and he and Dian wed.
Later, along with Ghak and other allies, David and Abner lead a revolt of humankind against the Mahars. Their foes are hampered by the loss of the Great Secret, which David has stolen and hidden. To further the struggle David returns to the Iron Mole, in which he and Dian propose to travel back to the surface world to procure outer world technology. Only after it is underway does he discover that Hooja has substituted a drugged Mahar for Dian. The creature attacks David but is overcome, and the return to the surface world proceeds successfully.
Back in the world we know David meets the author, who after hearing his tale and seeing his prehistoric captive, helps him resupply and prepare the mole for the return to Pellucidar.