Are humans likely to go extinct? This article from the Daily Mail cites an anthropologist who points out that the invention of agriculture (and, of course, other technologies) have liberated humans from the "natural" risk of extinction that other species face. I tend to agree with this -- humans now live in just about every environment on Earth and our numbers are steadily growing. More people means more brains and hands to deal with problems.
Humanity going extinct is a favorite trope in science fiction, of course. Ever since Mary Shelley's The Last Man, we've been fascinated with the image of a lone survivor wandering through the ruins of human civilization. Disease is a favorite because it leaves behind plenty of infrastructure.
Nuclear war is another favorite, of course. The Mail article makes extensive reference to the Bulletin of the Atomic Scientists and the famous "Doomsday Clock" on the cover, which has been close to midnight for half a century now. Frankly, the Clock never scared me much. It was always so blatantly political. The "Atomic Scientists"* moved the Clock to just seconds before Doomsday when Ronald Reagan became President -- yet Reagan is widely credited with ending the Cold War and reducing the threat of nuclear conflict. But the Bulletin's editors didn't vote for him, so therefore he was a menace to our survival.
The only way I can really imagine to make humanity extinct would be to make the whole Earth uninhabitable. That would require massive and intentional effort. (Any kind of deadly pollution or "environmental destruction" would only go on until the population dropped too low to make the activity causing the damage to stop being cost-effective.) Overpopulation, more or less by definition, can't make us extinct.
As I mentioned, I've always been skeptical about humans actually going extinct . . . so long as we don't want to. But demographics tell an interesting tale. The world's richest countries have zero or even negative population growth. Humanity may not go extinct, but Spaniards, Japanese, or Russians might. And someday, if even the poorest yam farmer in New Guinea enjoys the material comforts of a modern American, will the entire human race start to dwindle? How far does that process go -- does it bottom out at some point as the people inclined to put careers or self-gratification ahead of raising families drop out of the population? Will there always be some pool of fecund Noble Savages to fill the gap?
And there's another possibility, once pure science fiction but now well within the realm of the possible. We are steadily working on building machines as smart as we are. Even if humans go extinct through ennui, we may leave behind a successor species, which would preserve some portion of how we think and what we've created.
*The founding editor was a botanist, and the current editor is a public-policy professor. But all scientists are made of atoms.