The Enchanted Sword Shrine is one of the mini-biome treasure rooms added in 1.3 which houses an Enchanted Sword, the Arkhalis or a fake sword. Every shrine will contain one breakable background sword sprite, which has a 2/3 chance of being a fake sword and a 1/3 chance of being a real sword, which has a 1/10 chance of dropping the Arkhalis, instead of the Enchanted Sword, when destroyed.
The Shrine can generate below any biome that has a surface layer made of dirt and stone, at least 20% of the map width away from the center of the map. It will generate 100 - 200 feet below 1/4 of map height (from the top of the map), which makes its distance from the actual surface hard to predict. There will always be 1 shrine on small worlds, 3 shrines on medium worlds and 4 shrines on large worlds.