Notepad++ keeps inserting tabs which later messes up my code. This doesn't just happen when I hit the tab key, but other times as well. I want it to use 4 spaces instead of tabs.
How can I make Notepad++ insert spaces instead of tabs?
Go to the Preferences menu command under menu Settings, and select Language Menu/Tab Settings, depending on your version. Earlier versions use Tab Settings. Later versions use Language. Click the Replace with space check box. Set the size to 4.

See documentation: https://npp-user-manual.org/docs/preferences/#language
In my Notepad++ 7.2.2, the Preferences section it's a bit different.
The option is located at: Settings / Preferences / Language / Replace by space as in the Screenshot.
I have NotePad++ v6.8.3, and it was in Settings → Preferences → Tab Settings → [Default] → Replace by space:
In Notepad++ v8.7 it is now in the Indentation tab in preferences (Settings → Preferences → Indentation): Indentation settings
Notepad++ 8.6.9's preferences look somewhat different from existing answers' screenshots:
In the hope this can help someone else, I have to answer the question opposite from the OP's: my problem was that Notepad++ wouldn't honour my choice to use tabs for indenting Python files, and it would insert 4 spaces even in an already tab-indented file.
The solution was to go to Settings > Preferences..., then Language > [Your desired language], then the trick is that under Indent Settings, instead of "[Default]", you should choose again the desired language, then override the settings to whatever you like.
pythonoption set to use spaces. Not sure how long this has been there. As a side note...Notepad++ is awesome.