How would a black hole affect earth?
Depends on how close it is to Earth.
A black hole can range from a few solar masses (1 solar mass is the mass of our Sun) to a few thousand.
If we are very close to it, we will spiral into the black hole. The closer we get to it, the slower time passes relative to an observer at a safe distance. Time doesn't slow down for us but we will seem to slow down if Scott Kelly sees us from the ISS. In other words, we time travel into the future.
Even closer to the black hole, people on the side of the Earth that faces the black hole will age slower than people on the other side of the planet.
Even closer some more, we will be pulled apart because parts of our body are closer to the black hole than the others. Those parts of your body that is torn apart will tear apart and their pieces will tear apart too (spaghettification, yes, it is a word).
After passing into the even horizon, well, we do not know what happens. You might want to read up on Stephen Hawking's latest research on black holes.