I typically answer the door. I probably wouldn’t hide unless it was our super chatty neighbor. If it’s a salesperson or other solicitors I don’t let them in and will quickly railroad the engagement to “No thanks, bye.” If it’s people I know I may let them in but depending upon what mood I’m in I may just engage minimally until they take the hint, but I can’t honestly recall the last time I was visited out of the blue by a friend or acquaintance.
I used to live in a mother-in-law unit and my landlord was a super eccentric and chatty lady. I grew to habitually avoid her because she would often seek me out when she wanted favors, like transportation, and she knew I had trouble saying no. She once kept piggybacking one destination on top of another when I kept telling her that I had an engagement. I ended up being quite late. She would apologize profusely but of course stopped short of setting the boundary if I didn’t.
Overall I don’t like unexpected guests and even feel anxious about entertaining expected ones. There may be exceptions with regard to close friends, but I’d have a better chance of getting struck by lightning than getting a random visit from anyone I’d like to see.
Edit: I do fondly remember having friends who I could drop in on whenever, and I loved it. I really do admire that kind of flexibility and I wish I shared it.