How to work on theme/new blog without going live

This really puzzles me so I am hoping someone can shed light on this issue:

I want to be able to work on a theme to change the colors, etc without being directly on my website. How do you suggest I do this?

One thought is to install WP in a new directory such as Seems easy enough. I am just not sure how to move it all so that it works on the main domain.

Thank you for all your help.