frnikolai, I think you are worrying about things that are less likely than being struck by lightning whilst on the way to pick up your second jackpot lottery in a week!
There is a procedure that pilots follow for the loss of all engines, that basically entails trying to get at least one of them started again. This procedure would require a degree of time to accomplish. Recently there was the extraordinary case of an airbus taking off from Laguardia airport in New York that suffered total power failure seemingly as result of multiple large bird ingestion. In that case the crew tried initially to return to their departure point or to divert to another nearby airport. They then calculated they couldn't safely accomplish either option, so elected to land on a nearby river, which they achieved with great success.
This type of event is extremely rare, and obviously it would depend at what point in the flight you suffered the power loss. The more height and speed you have, the more time you can normally trade those commodities for.
All aircraft can glide, and the distance they can glide is a product of those same items. A couple of things are certain. One is if you lose all available thrust, gravity will become the dominant factor. The other is, it will all go very quiet.
If you can find a suitable surface to land on within your gliding distance there is every chance the aircraft will remain intact and (as in the recent case) everybody will leave the aircraft unharmed. Obviously if the aircraft is severely damaged and carrying a large mass of fuel and there are ignition sources, the outcome may well be far less happy. Clearly there is a combination of skill and luck. However the likelyhood of such occurances is so remote, that it should be slotted well down your list of phobias or plausible concerns.