Based on wikipedia:end of civilization
The end of civilization or the end of the world are phrases used in reference to human extinction scenarios, doomsday events, and related hazards which occur on a global scale. These are risks that would imperil humankind as a whole and/or have major adverse consequences for the course of human civilization. The term existential risk is sometimes used in this context.
The prediction of future events is known as futures studies.
Types of risks
Various risks exist for mankind and civilization, but not all risks are equal. Risks can be roughly categorized into six types based on the scope of the risk (Personal, Regional, Global) and the intensity of the risk (Endurable or Terminal).
The risks discussed in this article are those in the Global-Terminal category. This type of risk is one where an adverse outcome would either annihilate intelligent life, or permanently and drastically curtail its potential.
There are many scenarios that have been suggested that could happen in the future. Some are certain to happen and will almost certainly end humanity, but will only happen on a very long timescale. Others are likely to happen on a shorter timescale, but will probably not completely destroy civilization. Still others are extremely unlikely, and may even be impossible. For example, Nick Bostrom writes:
Some foreseen hazards (hence not members of the current category) which have been excluded from the list of bangs on grounds that they seem too unlikely to cause a global terminal disaster are: solar flares, supernovae, black hole explosions or mergers, gamma-ray bursts, galactic center outbursts, supervolcanos, buildup of air pollution, gradual loss of human fertility, and various religious doomsday scenarios.
It is certain that events in space will cause life on Earth to come to an end. The certain events, however, will happen at an extremely long timescale measured in billions of years. Projections indicate that the Andromeda Galaxy is on a collision course with the Milky Way. Impact is predicted in about 3 billion years, and so Andromeda will approach at an average speed of about 140 kilometres (87 miles) per second; the two galaxies will probably merge to form a giant elliptical. This merging could eject the solar system in a more eccentric orbit and an unwanted position in the merged galaxy causing our planet to become uninhabitable (an actual collision is unnecessary). In about 5 billion years, stellar evolution predicts our sun will exhaust its core hydrogen and become a red giant. In so doing, it will become thousands of times more luminous. Even in its current phase of stellar evolution, the sun is increasing in luminosity (at a very slow rate). Many scientists predict that in fewer than one billion years, the runaway greenhouse effect will make Earth unsuitable for life.
On an even longer time scale, the universe may come to an end. The current age of the universe is estimated as being 13.7 billion years. There are several competing theories as to the nature of our universe and how it will end, but in all cases, there will be no life possible. These scenarios take place on a considerably longer timescale than the expanding of the sun.
In the history of the Earth, it is widely accepted that several large meteorites have hit Earth. The Cretaceous-Tertiary asteroid, for example, is theorized to have caused the extinction of the dinosaurs. If such an object struck the Earth it could have a serious impact on civilization. It's even possible that humanity would be completely destroyed: for this, the asteroid would need to be at least 1 km (0.6 miles) in diameter, but probably between 3–10 km (2–6 miles). Asteroids with a 1 km diameter impact the Earth every 0.5 million years on average. Larger asteroids are more rare. The last large (>10 km) impact happened 65 million years ago. So-called Near-Earth asteroids are regularly being observed.
Some scientists believe there are patterns in the amount of meteorites hitting Earth. An interesting explanation of such a pattern is given by the hypothetical star Nemesis. This hypothesis states that a star named Nemesis regularly passes through a denser part of the Oort cloud, causing meteorite rains to collide onto Earth. However, the very existence of this pattern is not widely accepted, and the existence of the Nemesis star is highly controversial.
A star passage that will cause an increase of meteorites is the arrival of a star called Gliese 710. This star is probably moving on a collision course with the Solar System and will likely be at a distance 1.1 light years from the Sun in 1.4 million years. Some models predict that this will send large amounts of comets from the Oort cloud to the Earth. Other models, such as the one by García-Sánchez, predict an increase of only 5%.
Less likely cosmic threats
A number of other scenarios have been suggested. A black hole could enter the solar system. If this happened, the result would be catastrophic. Another threat might come from Gamma ray bursts; some scientists believe this may have caused mass extinction 450 million years ago. Both are very unlikely. Still others see extraterrestrial life as a possible threat to mankind; although alien life has never been found, scientists such as Carl Sagan have postulated that the existence of extraterrestrial life is very likely. Even NASA sterilizes items returning from space to kill any potential extraterrestrial life forms that might threaten humanity, like viruses. Scientists consider such a scenario technically possible, but unlikely.
In the history of the Earth, many ice ages have occurred. More ice ages will almost certainly come at an interval of 40,000–100,000 years. This would have a serious impact on civilization as we know it today, because vast areas of land (mainly in North-America and Europe) could become uninhabitable. It would still be possible to live in the tropical regions, but with possible loss of humidity/water.
A less predictable scenario is a global pandemic. For example, if HIV mutates and becomes as transmissible as the common cold, the consequences would be disastrous, but probably not fatal to the human species, as some people are immune to HIV. This particular scenario would also contradict the observable tendency for pathogens to become less fatal over time as a natural function of biological pressure.
Another possibility is the megatsunami. A megatsunami could, for example, destroy the entire east coast of the United States of America (see La Palma). The coastal areas of the entire world could be flooded in case of the collapse of the West Antarctic Ice Sheet. While none of these scenarios could possibly destroy humanity completely, they could regionally threaten civilization as we know it.
When the supervolcano at Yellowstone last erupted, 600,000 years ago, the magma and ash covered roughly all of the area of North America west of the Mississippi river. Another such eruption could threaten civilization. Such an eruption could also release large amounts of gases that could alter the balance of the planet's carbon dioxide and cause a runaway greenhouse effect, or enough pyroclastic debris and other material may be thrown into the atmosphere to partially block out the sun and cause a natural nuclear winter, similar to 1816, the Year Without A Summer.
Probably the biggest threat for humanity comes from humanity itself. The scenario that has been explored most is a nuclear war or another weapon with similar possibilities. It is difficult to predict whether it would exterminate humanity, but very certainly could alter civilization as we know it, in particular if there was a nuclear winter event.
Another category of disasters are unforeseen consequences of technology. It has been suggested that learning computers take unforeseen actions or that robots would out-compete humanity. Biotechnology could lead to the creation of a pandemic, Nanotechnology could lead to grey goo - in both cases, either deliberately or by accident. It has also been suggested that physical scientists might accidentally create a device that could destroy the earth and the solar system. In string theory, there are some unknown variables. If those turn out to have an unfortunate value, the universe may not be stable and alter completely, destroying everything in it, either at random or by an accidental experiment. This is called 'quantum vacuum collapse' by some. Another kind of accident is the ice-9 type transition, in which our planet including everything on it becomes a strange matter planet in a chain reaction. Some do not view this as a credible scenario.
It has been suggested that runaway global warming might cause the climate on Earth to become like Venus, which would make it uninhabitable. In less extreme scenarios it could cause the end of civilization as we know it.
Other scenarios that have been named are:
Antibiotic resistance. Natural selection would create super bacteria that are resistant to antibiotics, devastating the world population and causing a global collapse of civilization.
Demography. Demographic trends create a "baby bust" that threatens the order of civilization as we know it. However, nanotechnology may allow elderly people to have more youthful bodies, retain gainful employment, and allow them to breed offspring like a 30-year-old.
Dysgenics. A lack of natural selection and the tendency of the more intelligent to have fewer children would lower the average health and intelligence enough to lead to an eventual collapse of civilization, associated with controversial eugenics theories.
Ecology. Natural resources are used up, or the environment is so damaged through pollution and destruction that civilization fails.
Finance. Markets fail worldwide, resulting in economic collapse: mass unemployment, rioting, famine, and death.
Infertility. Human fertility continues to decline, eventually ending with no fertile humans left to continue the species. Once the nanobots neutralize the world's pollution,  it can no longer be blamed for infertility. There was even infertility back before industralization. Chances are that the world's population will reach 9 million by the year 2050 and stablize itself at 12 billion by the year 2200. So don't worry about these fearmongers and try to eat healthier so that you can breed offspring.
Overpopulation. World population may increase to such an extent in the future that it would lead to lack of space for habitation.
Peak oil. Oil runs out before an economically viable replacement is devised, leading to global chaos. We all know in the end that solar energy will power all our buildings.
Quantum energy. In the search for new quantum particles, scientists accidentally destroy the universe. This, however, is highly unlikely; a Chernobyl style disaster is much more possible. In particular, the Large Hadron Collider is expected to produce "a black hole anywhere from every second to every day, each roughly possessing 5,000 times the mass of a proton".
Telomere. Some researchers theorize a tiny loss of telomere length from one generation to the next, mirroring the process of aging in individuals. Over thousands of generations the telomere erodes down to its critical level. Once at the critical level we would expect to see outbreaks of age-related diseases occurring earlier in life and finally a population crash.
Every generation has faced its own fears of an unknown future; the historical record of prior end of civilization scenarios is plentiful. Some of these include:
Many fictional (and non-fictional) stories from the era of the Cold War were based on the belief that a nuclear war was inevitable, and that this would result in the destruction of all life on the planet Earth (see World War III for a list).
The Y2K bug, which was supposed to wreak havoc on computer systems and disrupt life as we know it. It didn't.
Nostradamus wrote a prediction that a great catastrophe would occur in the seventh month (July, or some argue September, the seventh month of the pre-modern calendar) of the year 1999. Many followers of his writings took this to mean that the end of the world would occur. When the chosen date came and went without incident, translators of his works began revising them with new interpretations of what the prediction actually meant. (Many now believe that this prediction referred to September 11, 2001.) Despite this, some people also believe according to Nostradamus, that the world will end in the year 3797. One leading Nostradamus scholar believes that is the year the Sun will explode as a Red Giant, possibly because of extraterrestrial intervention.
Sir Isaac Newton (1642-1727), who was involved in alchemy and many other things in addition to science and mathematics, studied old texts and surmised that the end of the world would be in 2060, although he was reluctant to put an exact date on it.
Many mistakenly believe that the Maya civilization's long count calendar ends abruptly on 21 December (or 23 December) 2012. This misconception is due to the Maya practice of abbreviating their dates to five decimal places. On monuments where the full date is shown the end of the last creation is said to happen much farther in the future. However the Mayas did believe that there will be a baktun ending in 2012. A baktun marks the end of a 400 year period and was a significant event on the Maya calendar. In the Aztec calendar, 2012 marks the end of a 26,000 year planetary cycle.