If the nearest star to us went supernova what effect would it have on earth, how long would it take to reach us?
If the nearest star went supernova is would have a devastating effect on life.
If a supernova occurs between about 30 and 1000 light years away it would have significant effects on the Earth's biosphere. The nearest star is just over 4 light years away which would have catastrophic effects.
The main problem would be gamma rays. They travel at the speed of light, so gamma rays from a supernova 4 light years away would take 4 years to arrive. We wouldn't know that the supernova had occurred until the light, which includes the gammas rays, arrived.
When large numbers of gamma rays hit the upper atmosphere, they ionise the gasses. This would form nitrogen oxides and destroy the ozone layer. This would then allow harmful ultraviolet rays from the sun to reach the Earth's surface. These rays would kill off many marine organisms which form a vital link in the food chain.
In reality, supernovas within 1000 light years of Earth do happen every 200 million years or so. There are currently no known stars which are supernova candidates within range, so we are probably safe for now. It is possible that a relatively nearby star which hasn't been studied carefully enough to determine the risk could supernova.