Here's an excerpt from the article that dialabrain pointed you to that is the most likely cause of your issue. As the official support person for my family I've seen this issue several times. The Mouse Keys feature can be inadvertently turned on by pressing the option key five times. If you confirm that's what happened to you, then I suggest opening the Accessibility System Preferences and disabling Mouse Keys.
Excerpt from Apple article
If you enable the Mouse Keys feature, many keys might not respond as you expect. Here's how to turn off Mouse Keys:
- In OS X 10.8 or later, choose Apple menu > System Preferences. Click on Accessibility, then choose Mouse & Trackpad from the list on the left side. Then deselect the Enable Mouse Keys checkbox.
- In OS X 10.7.5 or earlier, choose Apple menu > System Preferences. Click on Universal Access, then select the Mouse & Trackpad tab. Then select the Off button next to Mouse Keys.