You see, in Clara's mind, the Doctor actually owes her something from their travels together, and she suspects that includes changing the timeline so Danny is still alive. But she knows this Doctor would never do that for her, so she resorts to blackmail instead. Pretending she wants to visit a raging volcano, she steals the backup Tardis keys, knocks the Doctor out with a sleep patch, and locks him outside with the magma. When he wakes, she reveals that if the Doctor won't make an exception to save Danny, she'll destroy the keys one at a time by throwing them into the lava.
Setting aside the fact that the Doctor can unlock the Tardis by snapping his fingers (or even just asking it nicely), this is a very tense standoff. Clara is basically forcing this Doctor to behave like an emotional being for once, instead of the cold Time Lord Capaldi's performance has favored. True to form, the Doctor calls Clara's bluff, and true to her word, Clara throws the keys into the lava.
But it turns out the Doctor was in control the entire time, just not in the finger-snapping way you may have thought. Apparently sleep patches have no effect on the Doctor, so he just used them on Clara, inducing a dream state to see how far she would go. Given that past episodes have shown the Doctor could get back into the Tardis without those keys, this approach seems unnecessarily complex. But the end result is the same: Clara has betrayed the Doctor, and he needs to make a decision on what they'll do. His answer: "Go to hell."
In case it wasn't clear, he's not telling her to get out. He's saying he'll do what he must to find Danny.
Clara: You're going to help me?
The Doctor: Well why wouldn't I help you?
Clara: Because of what I just did, I just...
The Doctor: (angrily) You betrayed me. You betrayed my trust. You betrayed our friendship. You betrayed everything... you let me down!
Clara: Then why are you helping me?
The Doctor: Why? Do you think that I care for you so little that betraying me would make a difference?
I'm not alone is saying that up until this point, the Twelfth Doctor seemed entirely at odds with the optimistic personas of the past seven seasons. But it's here, finally, that Capaldi brilliantly shows that underneath his cold exterior, he still cares deeply for his friends. It adds a sense of compassion this Doctor sorely needed after several episodes suggesting he may not be the same friend to humanity anymore.
To be fair, this entire sequence is a little out of place since Clara and the Doctor aren't fighting at all for the rest of the episode. But it's worth it to know that, despite his gruff nature, the Twelfth Doctor still has a heart. Well, hearts.
Of course, that dark edge immediately creeps back in a moment later, when Clara tries to say she doesn't deserve his friendship: "Clara, I'm terribly sorry, but I'm exactly what you deserve." I suspect this conversation isn't quite finished and the Doctor will have something in store that feels like a punishment. Whether that's the case or not will be revealed in the next episode.