While there are profound uncertainties and disagreements about when or if it becomes conscious, artificial general intelligence (meaning it can understand or learn any intellectual problems like a human, rather than specialising on niche tasks) will arrive, a sizeable fraction of experts think it is possible within this century or sooner.
At some point, we are likely to have a planet where humans have largely been replaced by software intelligence or AI – or some combination of the two.
This means we should be able to get many more artificial minds per kilogram of matter and watts of solar power than human minds in the far future."Natural" humans may remain in traditional societies very unlike those of software people.It is not given that surrounding societies have to squash small and primitive societies: we have established human rights and legal protections and something similar could continue for normal humans.
They would probably regard software people and AI as going too far, but be fine with humans evolving into strange new forms.
If biological humans go extinct, the most likely reason (apart from the obvious and immediate threats right now) is a lack of respect, tolerance and binding contracts with other post-human species.