When you say "destroy anything in it's path", that's true, but it's also true for a star, even a red-dwarf or white-dwarf star would effectively eat or destroy almost anything in their path.
It's also worth mentioning that your scenario is very unlikely. According to this source, stars outnumber black holes 1,000 to 1 in the Milky way and most of those likely near the center of the Milky way. There are probably a few stellar black holes within 75 or maybe 100 light years, based on probability and since they would be hard to detect (see Rob jeffries' comment). But even so, one passing near enough to affect the Earth is very rare. Story about a star passing within 1 light year of earth here.
So, onto your question:
If such a black hole appears near our solar system, are we going to
survive? Is there any way not to fall in a black hole?
It depends how near and how big. A stellar mass black hole, with a mass range of about 3.8 solar masses to maybe 16 solar masses would need to get quite close to cause real problems.
Our Solar system has a very sparse Oort Cloud, extending perhaps almost 2 light-years and a much more densely packed, but still quite diffuse, Kuiper-belt, mostly about 30-50 AU (less than a thousandth of a light year). If we assume that a black hole, as much as 16 times the mass of our sun has similar orbital debris at larger orbits, an oort cloud around a 16 stellar mass black hole it could extend several light-years though still likely very diffuse, as well as perhaps a more densely packed asteroid belt and maybe even a few planets in the I dunno, 5-300 AU range or something.
The effect of a close pass gets pretty speculative and depends on the amount of objects in distant orbit around the black hole, but a pass as close as 1 or 2 light-years could increase the chance of a good sized comet or other objects striking Earth. Not a guarantee at that distance, but an increased chance.
Now if you get a pass-by of a few hundred AU to maybe 1,000 AU (about 1/50th to 1/100th of a light-year), you begin to get measurable Kuiper belt stirring up. If the black hole has it's own Kuiper belt equivalent, this could create a significant increase in asteroids and meteors flying around the solar system. A significant meteor strike on earth at this point becomes a distinct possibility, perhaps even likely and it could be a life killer and ocean evaporator.
With proper technology, it might be possible to deflect any asteroids on an impact trajectory. We'd probably observe multiple impacts on other planets too and at this distance, our solar system might even pick up a planet from the black hole if there was one in distant orbit.
At about 100-200 AU, the black hole has a chance of pulling some of the outer planets out of our solar system. It could also visibly alter Saturn's or maybe Jupiter's orbits and stir things up in our solar-system pretty good.
That's the most likely effect of a very near pass of either a star or black hole is a stirring up of more distant orbiting objects and a significant increase in the chance of planet killing or at least, dinosaur killing impact, but it needs to be very close. The article I linked above says that the star that passed within 0.8 light years (about 50,000 AU), some 70,000 years ago didn't measurably increase comet impacts.
To measurably change the Earth's orbit, maybe 30-50 AU. About the distance of Uranus or Pluto. This wouldn't pull the Earth away from the Sun, but it could change the Earth's orbit enough to alter the seasons and change climate on Earth. An elongation of our orbit could make the seasonal changes bigger and change the length of a year. The gas giants would all be moved. If the Earth survives any bombardment from a pass that close, it might quickly enter a new ice age, as one possible outcome, but we might be able to fix that by burning lots of fossil fuels. :-)
At somewhere around Maybe 12-20 AU, the Earth might get moved too much for us to adapt, perhaps outside of the Goldilocks Zone.
At somewhere around 5-10 AU (estimates are pretty rough), but this is where things get really interesting. We begin to see a measurable increase in tides and at this point and we could lose the moon. The earth could also get pulled outside the solar system, thrown into the sun or captured by and end up in an orbit around the black hole. We might begin to see a small tidal bulge on the sun from the black hole and a corresponding small increase in solar output, but that might require the black hole to be closer. Not sure. If the black hole gets close enough to the sun it could stretch the sun somewhat oblong and start to draw some solar gases towards it, but that might be pretty close, maybe 1 or 2 AU.
At maybe 3-6 AU, depending on the relative velocities, the sun might get captured into an fairly close orbit around the black hole, turning our solar-system into a binary and the planets could end up pretty much anywhere in that scenario.
At 1 or maybe 2 AU from Earth, we could see some cracking of the Earth's crust and a big increase in volcanoes and earthquakes.
Even at 1 AU, the black hole still wouldn't be visible unless it's acquired enough matter to form a bright accretion disk, in which case it might be very bright, but still visibly very small like a super bright star in the sky. Without an accretion disk the gravitational lensing should be visible by telescope but not to the naked eye.
Much closer than that and it hardly matters. The Earth's would be largely be re-surfaced with magma and the oceans would probably boil. All that said, the Earth still isn't being eaten. To eat the Earth a black hole would need to pass somewhere around maybe 5 or 10 million miles. Super-close for another stellar object.
I welcome correction if any of my math is broken, but that's my roughly calculated estimate.
article with some of the same conclusions.
Edit - due to comment above
I mean a supermassive black hole, like the one we have in the center
of Milkyway
My long answer above is basically gravitational effects when the black hole is in the general vicinity of the solar system. That kind of very close pass happens very rarely, but the odds of a black hole hitting earth is very slim. The odds of a black hole passing close enough to our solar-system and stirring things up in an undesirable way, also unlikely but more likely than a black hole actually hitting earth.
The most likely effect is some gravitational swirling (if you will) due to the massive object passing kinda close to the solar system, and as a result, possible impacts, possible orbital changes - stuff that wouldn't be fun, even if it passes outside the orbit of Pluto.
With a super-massive black hole, it's basically the same answers but the distance can be much further out. Sagittarius A is about 4 million solar masses, compared to a stellar mass black hole which is about 4 to 16 solar masses. That's 250,000 to a million times bigger, so equivalent gravitational occurs at the square root of that, about 500 to 1,000 times further.
The tidal effects are actually much smaller. A 4 to 16 stellar mass black hole could fly by at roughly Pluto's orbital distance (30-50 AU) and as it passes, it could pull Jupiter into a very different orbit, perhaps even away from the sun, but a super-massive black hole fling past some 500 times the distance of pluto (about 1/3 to 1/2 light year) would exert the same gravitational tug, but that tug would be much the same across the entire solar system, so the entire solar system could be pulled effectively into orbit around the super-massive black hole without changing shape too much. It still be visibly very tiny though the gravitational lensing might be visible to the naked eye at that point, but not much bigger than a star.
The real danger with a super-massive black hole passing within a few light-years of our solar system is the stuff it carries with it. Super-massive black holes are orbited by stars and presumably all the stuff that generally orbits stars, like planets, moons, asteroids, comets. All that stuff would approach our solar-system long before the black hole came close and that's the mostly likely answer. Our solar-system would likely be pelted by orbital debris when the super-massive black hole was still a few light-years away. I don't think I should try to guess how many but a super-massive black hole would carry with it orbiting debris for several light years.
My quick and dirty answer to the super-massive question. You mgiht think a black hole of that size would strip the atmosphere off the earth and stuff like that, but with a super-massive black hole, the tidal forces are much smaller at the event horizon. The atmospheric striping and earthquakes and other effects don't happen until it's enormously close, at which point the earth would be orbiting around it quite fast, perhaps fast enough that the night sky might visibly appear to spin to the naked eye. We could get pretty close to it before life on earth became unlivable, provided we're not bombarded by orbiting debris first.
There could be other effects. Gamma rays from any matter falling into the black hole or perhaps strong magnetic effects. More precise predictions gets a bit difficult for me.
That's my layman's attempt at an answer anyway.