Do you mean your keyboard space bar is sticking or are you expecting the PC to automatially put in a space after a word?
Replace or clean the keyboard is first thing. Windows will not just decide to not let you type in a space at times unless there is a physical issue with the keyboard.