Safe spots are best known for occurring in popular 1970s and 1980s 2D action titles, emerging from programming practices of the era. Prior to developing more sophisticated scripting and AI routines that adapt to a player's actions and movements, patterns of enemies and projectiles in video games would be mostly linear and repeating.
A safe spot is most apparent when the player character under attack can remain motionless for an indefinite period without taking damage or dying. The movement or bullet patterns of an enemy, boss, or the stage itself simply do not intersect that particular spot to result in hit detection. These spots stay consistent every time the game is played.
In 3D gaming, safe spots are often a result of geometry and pathfinding errors. An enemy may become randomly stuck on a corner and unable to approach the player, or a wall may not properly negate the range or effect of the player’s weapon if the enemy is against it. Notably in cases where this affects PvP combat such as online multiplayer, it is treated as an unfair advantage and the glitch is (hopefully) patched out.