I don't think humans will ever go extinct. We're too stubborn to die. Climate change won't wipe out humans. It'll just make it very uncomfortable for humans to live, and it'll probably kill a large majority of us. But that's at least a few hundred years away and we'll probably have a solution by then.
A meteor could do it. A full on planet killer. But even then, we'd likely find a way to survive. Even if it's just a small percentage of the population. Around 70,000 - 80,000 years ago the human race got down to very small numbers. Probably less than 1,000. But we survived 'cause we're an effective virus.
The sun won't go for another 4-5 billion years so that's not likely to get us.
There are other ways to go but they're pretty rare. Still possible though.
My favourite one is vacuum decay. Basically put, it's a quantum mechanical effect that results in a Boson triggering a pure vacuum state. If this happens (and it may have already happened), then from that point a pure vacuum will expand at the speed of light. It will annihilate anything in its path. Not just destroy, anything it touches will cease to exist. And it travels at the speed of light so you won't see it coming. One second you'll exist, the next second you won't.
One of the more interesting ways to wipe out the human race, and the Universe.