This is a novel set in the Arizona Territory and moving to Texas beginning in 1876.
Jeremiah Rebourn is 16 years old and on his way to the Yuma prison when the prison wagon he is in is attacked by Apaches. The wagon rolls, and everyone but Jeremiah is killed. Apparently the Apaches think he is dead, too, but an old miner comes along and takes him prisoner.
For two long years, the old miner refuses to speak to Jeremiah. He forces the boy to dig ore from his mine deep in the side of a hill, leaving Jeremiah addicted to the bitter tea the miner had forced him to drink every night that made him sleep. The experience also leaves him terrified of the dark and closed places.
The odd thing is that the miner leaves him finally with a sack full of gold. Enough to support him for the rest of his life. He wanders until he finds a ranch and is offered work. That is the beginning of his good life and the end of what I'm going to tell you about it.