When you shoot, slash or punch in a game, the game does not check your pretty character model against the enemy's pretty character model. That would be slow and messy. Instead, every character gets one or more simple invisible shapes, usually boxes, spheres or capsules, and the game only asks one question: do these shapes overlap?
These shapes are called hitboxes. Often the shape that deals damage is called a hitbox and the shape that can receive damage is called a hurtbox. Many players use "hitbox" for both, and so will we.
A detailed model can have tens of thousands of triangles. Checking a bullet against all of them, for every player, many times a second, is wasteful. A capsule is a handful of numbers. So developers use simple shapes, and then tune them on purpose.
That tuning is why a hit can feel unfair. A box can be a little bigger than the visible character, which makes the game more forgiving. It can be smaller, which makes dodging feel generous. Many shooters also split the body into zones, for example a small head zone that does extra damage and a bigger body zone that does less. A hit on the head zone is a headshot even if the bullet looked like it passed over a hat or hair.
There are a few honest reasons a shot looks like a hit but does not count.
The box and the model disagree. A swinging arm, a cape or a crouch animation can stick out of the box. The game only counts the box.
Time is not the same for everyone online. In an online game your screen shows a slightly old picture of other players, because their position had to travel to you first (see our guide on ping). Many shooters use a technique often called lag compensation: the server rewinds other players' positions a short time to roughly where you saw them when you fired, then checks your shot. This usually favours the shooter, which is why a player can be hit just after they think they reached cover.
Updates arrive in steps. Servers update the game world a fixed number of times per second, so positions move in small jumps rather than perfectly smoothly.
None of this means a game is "broken". It means a fast, shared game needs simple rules, and simple rules sometimes disagree with what your eyes saw.
Fighting games draw the line very clearly: an attack has a hitbox on the moving fist or foot, and the opponent has hurtboxes on their body. If the attack box touches the body box on the frame it is active, you score. Platformers do the same with enemies and spikes, and many give you a slightly smaller box than your sprite so near misses feel fair. Some games let you switch hitbox display on in a training or debug mode, which is a great way to learn how a game really works.
If you want to improve at a game, aim at the middle of the target, not the edge. Visible edges are where model and box differ most. If a game offers a training mode with hitbox view, spend ten minutes there. And when a hit feels wrong, remember there are usually a few reasonable explanations: the box, the delay, or the update step.