This is something I didn't go into last time even though it relates to magic because I felt it deserves it's own section.
Also while I got the idea from Jim Butcher's Dresden Files I'm fairly sure the similarities slow down from there.
The BasicsA Threshold, at the most basic level, is a dividing line between the outside world and a person's Home. All homes get this no matter if the people inside are good, bad, aware, or not of the mechanism. This division between home and the outside world acts as a barrier that spirits and non-sentient supernatural/magically active beasties cannot cross without somehow being forced. Crossing a threshold uninvited strips away a part of the intruder's power that is then returned on leaving.
What Thresholds cannot do
It's important to understand that a threshold does not mean that the big nasty that's trying to murder you cannot enter your home. Anything can be made to enter if forced. However left to their own devices most magical creatures and more than a few sentient critters that owe most of their existence to magic have no real urge to try.
Anything on the other side can, if it has the capacity to think for itself, choose to throw something across the threshold. It may give a defense against magical threats, but a thrown rock is still a thrown rock.
Example: A pack of gremlins is chasing Jeric. If he cannot get away from them the imps can and will murder him. So Jeric slides into someone's house. One of the imps sees him and throws a dagger through the open window but the pack makes no attempts at entering.
Invitation and Intention
As the example implies you don't have to go into your own home to benefit from this. However if you use magic you will also have to deal with the fact your power has been nerfed by being uninvited yourself. The owner of the home can lift this by actively welcoming the person. The words only matter in that it makes the intent of the home owner clear ('Come in', 'Take a seat', 'come lay down', the exact wording doesn't matter so long as the person's intent is to welcome.)
The flipside of this is the home owner can revoke that invitation at any time and while in theory this means whoever's lost the right to be there should suddenly find 'the house' resisting them it's far harder to get rid of trouble once it's inside. Once outside though the newly uninvited is going to be treated just like any other wayward spook.
An open unattended door can be seen as an invitation, but only for those things (and people) that can think and reason. Why is hard to say but the best theory is the unattended open door is an implied 'I don't care who comes in' rather than a full on invite. End result is the same. Any random shmoe can come inside unannounced.
Animals (the magical sort like imps, kappa, and the like) see no difference between open and closed doors unless that animal happens to be considered part of the house (such as pets.)
Primarily a threshold acts as a barrier. However it can also act as an anchor to keep enchantments from vanishing with the morning sun. Magic made by the caster has more punch to it inside their home than outside, which goes back to the concept of a man's home, if nowhere else, being his domain. Doesn't matter what social class or gender the person is. They could even be a slave. It doesn't matter (well in the case of a slave or a vassal the owner/liege lord gets an implied invitation.
Creation and Destruction
There are a few requirements before a structure can have a threshold; few but they are unbreakable.
It has to be a permanent structure: That means tents, improvised shelters, caves, hollowed out trees, or the like don't get a threshold. Caves and Tree houses could if a person sat and improved on them, but it takes building with the intent of that place being meant for living.
People have to be living there: Makes sense doesn't it? If someone isn't living there then it isn't a home. The rub here is whether the people that were living there had intended to come back or not. If a family gets evicted then leaves then by the next morning it isn't a home until a new owner shows up and moves in with the intent to stay long term. In cases where the owner leaves with the intent of coming back and simply don't it takes longer. Anywhere from a week to a month depending on if it were a rental apartment or an actual house that's been lived in for years. No there aren't hard numbers or formula, but if they aren't coming back because they're dead the threshold protection is essentially gone.
Working from Home means it isn't a Home anymore: You may sleep there. You may call it a home, but if you're constantly having people over because that is a business then it isn't really a home. Just a workplace you happen to sleep at.
It has to have barriers to the outside: Falls under the 'dur' side of things, but a home with no way of keeping random people from just walking in isn't a home. Something as simple as a set of planks, or bundled and flattened thatch, or a plug made out of mud. Doesn't have to be complex. It just has to be something anyone from the outside has to make an effort to open.
Usually if it's a traditional 'home' (doors, windows, roof) and someone moves in that structure gains some sort of threshold the first night they stay there. Usually for the first few nights it's a very flimsy barrier to the outside, but it quickly steps up once moving and unpacking and all that are finished. No it doesn't matter if you have seven or so boxes that never seem to get opened. Again intent plays a huge role here and makes it terribly difficult to pin things down to a hard number timeline.
Oh and as a final note for the segment. Fire. Bad. Fire very bad. Sure if something destroys your home be it flood, earthquake, tornado, or whatever then there's no threshold (no house there kinda makes it redundant) but fire is a special kind of destruction. Any wards, any enchantments dependent on a threshold go as soon as the fire gets past the point of containment (or rather to the point where attempts move from saving the house to saving everything around the blazing inferno now occupying the space your house used to sit.)