This is a topic called "lag compensation" and it is one critical aspect of network-based gaming, especially in shooters. The best article about this that I've read is on the Valve Developer Wiki, but I'll attempt to summarize in some simpler terms.
When you're playing a game with other players on a network, you are essentially sending a series of commands to a server, and that server is responding back with the results. Everyone is doing this at the same time. That means that there is a really good chance that what you are seeing on your screen is at least a little out of date - usually at least tens or hundreds of milliseconds out of date.
That means that when you line up and take a shot at someone, you're doing so based on some old information. You're shooting at where that person was the last time the server told you this information. They've probably moved since then. You send a command to the server saying "hey, I'm aimed at this guy, and I pull the trigger. BAM! I hit him!"
When this command gets to the server though, it already has a command from the other player that says "I sidestep to the left 5 feet." If the server took both of your commands, you'd miss, even though on your computer you saw a hit.
The game has to compensate for this, and there are a couple of big ways that this is done. One is that your client assumes certain things complete, even though the server hasn't confirmed they've happened. This is called client prediction. If you've ever gotten really bad lag where you take a couple of steps forward but then snap back to your old spot, this is client prediction gone bad.
What you're seeing here, though, is called lag compensation. Essentially, the server gets your command to shoot the other player, and it rewinds the game to the point where it was when you sent it to the server. From there, the server attempts to determine if you hit the player or not. That is to say, even if they'd moved in the time it took your command to get to the server, you still executed the "shoot" command before the other player sent his move command, and so it counts as a hit.
The net effect of this is that hitboxes are going to appear weird depending on where you're looking at them - the client is thinking slightly ahead, and the server has to continually rewind time.
To your question about bullet speed, many weapons in FPS games are "hitscan" weapons, which means that when fired, it is assumed their projectiles are infinitely fast and impact whatever they were fired at immediately. Most bullet-type weapons in TF2 are this way, for instance.