Most scientists think that oil will run out since it's a non-renewable fuel. No one knows exactly when it'll run out but there have been lots of different predictions e.g about 40 years ago Scientists predicted that it'd all be gone by the year 2000. New Oil reserves are discovered from time to time and technology is constantly improving so it's now possoble to extract oil that was once too difficult or expensive to extract. In the worst-case scenario oil may be pretty much be gone in 25 years. Some people think that we should immediately stop using oil for things like transport and keep it for things that it's absolutely essential for like chemicals and medicine. It will take time to develop alternative fuels that will satisfy our energy needs. It will take time to adapt things so that fuels can be used on a wide scale. One alternative is to generate energy from renewable sources that won't run out. So however long oil does last for its a good idea to start conserving it and finding alternatives now.
Why Oil isn't good for the environment
Oil spills can happen as the oil is being transported by tankers this is a disaster for the local environment. Birds get covered in the oil and are poisoned as they try to clean themselves. Other creatures like sea otters and whales are poisoned too. You have to burn the oil to release the energy. But burning oil is thought to be a major cause of global warming, acid rain and global dimming.
Other Environmental problems
Power stations burn huge amounts of fossil fuels to make electricity. Cars are also a major culprit in burning fossil fuels. Most fuels such as crude oil and coal contain carbon and hydrogen. During combustion, the carbon and hydrogen are oxidised do that Carbon Dioxide and water vapour are released into the atmosphere. Energy (heat) is also produced.
hydrogen+oxygen ----> carbon dioxide + water vapour
If the fuel contains sulfur impurities will be released as sulfur dioxide when the fuel is burnt. Oxides of nitrogen will also form if the fuel burns at a high temperature. When there's plenty of oxygen all the fuel burns- this is called complete combustion. If there's not enough oxygen some of the fuel doesn't burn- this is called incomplete or (partial) combustion. Under these conditions solid particles of soot (carbon) and unburnt fuel are released and carbon monoxide is also released.
complete combustion= methane+oxygen----> carbon dioxide+water