You'll be telling ruby or rails what to run, you can save them anywhere. A good place would be in a subdirectory to your home directory. You would then open up a command line interface, navigate to that directory, and start typing commands.
You need to install ruby, there's some site rubyinstaller for doing that on windows
When you've done this, confirm that it has been added to your PATH variable by running
If they both output version numbers then you can continue to install rails with
gem install rails
And then you can check if that's installed properly with
Again, you'll want a version number to be printed.
If any of those fail, you'll need to check that they were installed to your system and are in your PATH variable. The details for doing that on your OS is something you'll find with your favourite search engine.
After that's all done, navigate to the directory of your project which can be anywhere you want - and start typing commands.