You have not given us any information about your laptop or stated if this happens in all programs you are typing in or just Word, so I am going to give you a very generic answer.
Install an external keyboard. If you no longer have the problem, the issue has to do with your laptop's keyboard. This could be a loose connection or it damaged or have a stuck fN key, etc.
If the problem persists, it could indicate a driver issue or an internal hardware issue.