Commonly a door between two rooms, with plenty of room to maneuver on both sides.
All things being equal the best thing to do is rush to cover the doorway with your* defenders - get there first and hold it. Ranged attackers can form up behind and fire over/between the defenders.
This assumes a mechanic like in D&D where ranged attacks can go through an ally's square.
If you can't fire through an ally's square the best thing to do is hang back from the choke point and make the enemy* put themselves in it, allowing you to pick them off in smaller numbers as they queue to get through.
If neither side has ranged attackers it is again best to hang back and make them take the choke point, allowing your melee classes to surround them.
If the other side has more ranged than melee and you don't, you can use the walls on either side of the door as cover to negate the effectiveness of ranged attacks and force them to come through into melee range. It may reduce your ability to hit any defenders coming through the door, but you may be able to pull them out of the doorway out of sight of the ranged attackers and pound on them safely there.
If you have a controller class that can lay down a zone, you can make the doorway a hazardous area or difficult terrain, either making it harder to get to or out of or undesirable to hold it. If the zone negatively affects the enemy and not you, all the better.
Bear in mind that the enemy doesn't necessarily need to come through the choke-point, perhaps they're happy to wait for you to come through, or maybe the delay in attacking allows them to get reinforcements or set/activate a trap.
* I won't cover the same situation from both sides with the words 'enemy' and 'you' swapped around - if the situation puts you in the position I've listed as 'enemy', just imagine it the other way around. This applies whether you're the DM or the player side.