Let's leave aside the question of legality (*) for the sake of argument ...
Yes, it works (**). If you're a bit of a nerd and don't mind mucking around with the command line, you'll be perfectly fine. Moreover, if you have a machine that works with one of the available (and to my knowledge - perfectly legal, IANAL) EFI emulators, you can even install Leopard directly from the retail disc and apply software updates without having to wait for "customized" versions.
Assuming doing so in your geographic location is "legal", the equivalent of ~$1500 can buy you a machine that'll blow the pants off any iMac (***) and in some cases even give a Mac Pro a run for its money.
All that being said ... Google is your friend, don't pirate OS X and don't be doing anything illegal!!
(* - AFAIK, Apple allows you to install the OS on a single piece of Apple hardware, not "any computer" you own. But depending on where you live, so-called "shrink wrap license agreements" may not be enforceable.)
(** - Depending on your hardware it can also turn out to be a complete nightmare with half of your machine - e.g., sound, networking, video card, etc. - not working properly)
(** - i.e., quad core cpu, 8GB RAM, nVidia 8800gt, terabyte HD, etc., etc.)