In this very brief story in the Book of Joshua, chapter 5, an angel appears to Joshua, near Jericho, and tells him to take off his shoes, for he is standing on holy ground.
There is a similar but better-known passage in the story of Moses and the Burning Bush, in Exodus 3:5, where Jehovah commands Moses to take of his shoes, again because he is on holy ground.
What do these stories mean?
In both stories, there is a warning. The angel who confronts Joshua does so with a drawn sword. In Exodus, there's a burning bush, and Jehovah warns Moses, "Do not draw near this place." These warnings mean that Moses and later Joshua must not continue to think of the Divine from just a sensuous level. Instead, they need to approach the Divine with their more interior minds, through what they love and understand.
They are both told to take off their shoes. Why? Shoes represent the lowest, sensual part of our minds. That low, physically-oriented part of our mind can get in the way of our ability to elevate our minds and start to think clearly about spiritual things.
It's interesting. We need to be able to elevate our minds to be able to receive and think about spiritual truths, and we also need to live them out through our natural minds in the natural world. We have to get good at using this tension between elevation and grounding.
If we do make headway in our spiritual thinking, and in living out the truths we know, gradually our natural mind gets re-formed, too, so that it's capable of receiving influx from the Lord, too. Here are links to two of the key passages in Swedenborg's works that explain this further:
Arcana Coelestia 6843, and Arcana Coelestia 6844.