There is no difference for xampp on localhost or apache on any host - simply create file called ".htaccess" in any folder you need and enter the appropriate configuration.
Be sure that "AllowOverwrite" is set to "All" for that folder in httpd.conf
...in Windows, Explorer will not allow it, right? So from the prompt ("cmd"), I use copy con, then F6, then ENTER & then I can edit the file with like Notepad++ or whatever. Any other way? :)
Take any "real" texteditor (not Notepad) like "Textpad" or "Uedit", start it, enter some data and save with the name you like - for example ".htaccess".