When you see the blue flame in the upper right corner of the screen (beside your EXP bar), that means that the game is saving. The game saves actively upon any changes or movements like using/finding items, fast-traveling, leveling up, etc so consider almost everything you do to be permanent.
You can’t escape the game by simply quitting it or closing the application since it will automatically save your game in the same exact spot, even if you’re in the middle of battle. To avoid problems, make sure to escape to a safe area before quitting the game or just accept your fate and die peacefully. If you closed the application or turned off your console without quitting the game, you’ll get a warning the next time you boot the game.
We have questions and answers related to this topic which may also help you: