The simple answer to your question, how can these run at real time is that a processor can execute millions of instructions per second (technically billions per second with many of today's processors). While it waits for user input from us slow users it can be executing millions of instructions that we won't even notice. Still you can tell how games have grown in sophistication as computers have gotten more powerful. The graphics, AI, and physics are more realistic today then in 1990.
Also your question did not mention if you were interested in single player computer games like DOOM/Quake (ignore deathmatch for now) or multi user games like Everquest/World of Warcraft/etc.. I would assume "thousands of bullets" implies a multi player game, since for an individual game it would be a bit much for a single player.
Anyway as an example, if you try to play DOOM on a 386 SX 25, it will run super slow. Take that same game on a Pentium PRO 220 with similar ram and a faster processor and it runs very quickly. Now, it is typical for computers to run at clock speeds of 1500 MHZ. Consider that 25 MHZ is enough to run doom (although everything is ultra slow) and now a typical person has 60 times the computing power (in reality a lot more than just the processor clock speed changed so the speedup is even more dramatic).
Even on the Nintendo Entertainment System (NES), get too many enemies on the screen at once and it slows to a crawl. But in the Super Nintendo you could often get a whole screen full of enemies at once (see white ghosts in super mario world). Still compared to even the Super Nintendo the Playstation/XBOX/GameCube/WII are all super computers. And basically as hardware gets better you can do more.
Also, physics equations are just simple algebra but the computer is just substituting numbers in which is a relatively fast operation (in the past I read that games often used Newtonian physics equations which tended to be much simpler than the full relativistic equations). But basically evaluating equations doesn't take much time at all. Still if there were thousands of bullets at once on a 386 SX 25 it would have some calculation problems. Still, many of the earlier games did not have anything resembling real physics at all. If you were hit, you just blinked or were thrown back a certain amount no matter how the other character went.
Graphics slow things down as well. But in that department now graphic cards do some of the graphic processing in the hardware freeing up more of the processor. Also for the stuff the processor does compute, it is now much quicker. Memory and bus speeds have greatly increased as well making it much quicker to transfer the graphic representations from memory to the card to the screen. You can also store a lot more intermediate stuff in memory to speed things up.
AI slows things down as well. Early games like the NES often had bad guys who moved in a set pattern, or maybe moved and had a few attacks that were switched based on a random number or in some cases special rules based on the player. But they were simple. Now on some pc games, depending upon how you fight an enemy, it may seem completely different from the last fight. There is still a long way to go with AI, but compare Bowser in Super Mario Bros 1 to Metroid Prime in Metroid Prime and there is a huge difference in reactivity to the player.
Multi player games often have multiple servers doing the processing. Basically throwing more hardware at the problem. Also, in many of the modern graphical games you download a client which does most of the graphics for you using your computer. The game server needs to keep track of your health/ammo/positions/etc but as for all the graphic work, your client does most of it. And even your client only needs do animate things that happen in your more immediate area. If someone on the other side of the mountain is in a life or death struggle with a dragon, your client doesn't need to animate that.
Also the server may not have to handle the physics entirely either. It may just have to see if an attack hits you or not, and the client may be free to animate the path of the bullet. I suspect the exact division of labor in multi-player games vary based on the game. Even without multiple servers, it wasn't unusual for text based MUDs (Multi User Dungeons) with 40 or 50 players online to be running on Pentium 200 servers and not fully taxing the machine. True this takes graphics and even physics out of the equation, but you still have to keep track of player positions in the world, ammo, magic, items, health and a lot of MUDs had sophisticated enemies who would react to players depending upon how they were attacked. When you think about it, many multi player games are basically MUDs with graphics. This is even more true when you consider that most of the graphics are often handled by the client.
When the graphics are mostly done by the client, the server doesn't do that much more than a MUD except now it has to keep track of more than a "ROOM" and it probably has to do some physics in determining how hits effect you. It may not have to compute the path of a bullet or the path of a fall, but it probably has to calculate the final position or at least whether something hits you or not. Still in many multi player games I can't see the bullet hit me. I just know I was hit. I can't tell if the hit was in an arm or a leg. With that kind of latitude even less calculations need to be done, the computer could simplify players as cubes or something similarly easy to calculate.
Anyway, a basic one player game (or even a few players like a doom deathmatch) runs fine on one processor. As processors improved so did physics, graphics, and game AI and this isn't a coincidence. Many single player games are not multi-threaded at all and even on a multi-core computer they still only use one core. Even in multi-player games, that client often is not multi-threaded and sticks to a single core on a multi player computer.
On multi player games, the game server itself may be one server, but for bigger games it may be a server farm. Still for other games you may get one server per area where the server handles all the calculations for players in an area it covers and once you leave the area you transfer to a different server. Basically the "techniques" for handling the server side and client side of a multi player game will vary based upon the game.
As far as specific techniques, there are books and courses on them. But as for how the computer can do everything at once, it is that fast!! And as it gets faster (and developers learn how to do multi core stuff better) games will get even more sophisticated!! Basically early games had to take shortcuts in AI/Physics and even had weaker graphics to be real time, but now some games have graphics that compare to movies. And basically this all comes from hardware improvements, especially the processor!!!