The Shulhan Aruch (Orah Haim 218:4) says that if one passes the place in which one experienced a personal miracle, one should recite the blessing of “She’asa Li Nes Bemakom Ze” (lit. “Who performed a miracle for me in this place”). A miracle is defined as something which deviates from the normal course of nature and the way of the world. On the other, something positive which occurs to someone but can still be attributed to the normal course of the world, such as averting harm from a burglar, does not warrant a blessing. Some opinions say that even in such a situation one could recite a blessing, although the normative Halacha is that one would recite the blessing without Hashem’s Name.
Some Poskim explain that another definition of a miracle which warrants a blessing with Hashem’s Name is when an expert judges that there is no logical explanation for someone to come out of the situation alive. For example, if a car flips over in such a way that a transportation expert or a doctor assesses that such an accident is typically fatal, and yet the person survived, this would be considered a miracle.
Rabbi Betzalel Stern (Betzel Hahochma) rules that if a Holocaust survivor returns to the concentration camp in which he/she was previously interned, such a person could recite the blessing over miracles with Hashem’s Name. Since the odds of surviving such a fate were slim it is considered to have deviated from the normal course of the world, and thus is considered a miracle.
Summary: One recites a blessing when one finds oneself in the location of a personal miracle. If one benefited from a fortunate event that fits the normal course of nature could recite the blessing, but without Hashem’s Name.