The most common cause is the least dramatic: the touchpad has been switched off. Most laptops have a function key or a corner tap that disables it, and it is easy to trigger by accident while typing.
Wrong characters rather than no characters means a layout problem. A keyboard set to a different regional layout will swap quotation marks, the at sign and currency symbols while everything else works perfectly.
When nothing responds at all, decide quickly whether it is hardware. Plugging in a USB keyboard or mouse answers that in seconds: if the external one works and the built-in one does not, the fault is physical or a driver, not the system.
Liquid and crumbs cause the rest. A single sticky key can repeat endlessly or block others, and liquid damage often appears days later as a group of neighbouring keys failing together.