This is also a common symptom of a machine that is loaded down with viruses or other processes running in the background, and using up the machine resources.
PC keyboards do not actually send a character code to the machine, they just send a code indicating that ‘button #42 has been pressed’. The machine has to convert that into the appropriate ASCII character code. (Which is why it’s so easy, using software, to change your keyboard layout from English to French to Danish etc.)
But not having this conversion hard-wired into the keyboard means that the CPU must spend time doing this. If the CPU is under a heavy load, it might be too busy to keep up with a fast typer. Generally this only happens when the computer is running a very intensive computing operation – or when many viruses/spyware/adware/ are running hidden in the background.
So if you don’t find any hardware problems, you might look into this.