Generally speaking, you'll have to go obtain a variant copy of OS X. It will look and feel the exact same as OS X, but it will allow you to install on non-apple products.
My advice to you is to avoid installing OS X directly. You'll be sure to run into some compatibility issues. Generally I like to keep OS X, FreeBSD, Fedora, and BackTrack installed on a virtual machine. If your system can handle it, that would be my advice. Virtual Box is a very easy to use tool, and if you run into any issues I'd be happy to help.
PS
Yes it is technically illegal. That being said, your chances of being caught are near zero. If it is your moral code that conflicts with the crime, then just walk in and purchase a genuine copy of the software before pirating the variant :)