To do this mental simulation you recruit what psychologists call your “Theory of Mind”, the ability think about others' beliefs and desires. Our skill at Theory of Mind is one of the things that distinguish humans from all other species – only chimpanzees seem to have anything approaching a true understanding that others' might believe different things from themselves. Us humans, on the other hand, seem primed from early infancy to practice thinking about how other humans view the world.
The fact that the curse of knowledge exists tells us how hard a problem it is to think about other people's minds. Like many hard cognitive problems – such as seeing, for example – the human brain has evolved specialist mechanisms which are dedicate to solving it for us, so that we don't normally have to expend conscious effort. Most of the time we get the joke, just as most of the time we simply open our eyes and see the world.
The good news is that your Theory of Mind isn't completely automatic – you can use deliberate strategies to help you think about what other people know. A good one when writing is simply to force yourself to check every term to see if it is jargon – something you’ve learnt the meaning of but not all your readers will know. Another strategy is to tell people what they can ignore, as well as what they need to know. This works well with directions (and results in instructions like “keep going until you see the red door. There’s a pink door, but that’s not it”)
With a few tricks like this, and perhaps some general practice, we can turn the concept of trying to read other people’s minds – what some psychologists call “mind mindedness” – into a habit, and so improve our Theory of Mind abilities. (Something most of us remember struggling hard to do in adolescence.) Which is a good thing, since good theory of mind is what makes a considerate partner, friend or co-worker - and a good giver of directions.