It's not illegal if you buy the OS X installation DVD, it just breaks the OS X Eula, which you may be able to get around by placing an Apple sticker on the PC. (Apple Eula states that you can install OS X on an Apple branded computer only, but they do not state what actually constitutes an Apple branded machine).
In any case the easiest thing to do is to buy a Mac and install Windows using bootcamp. Even low end Macs are fairly decently specced in PC terms (which is why they cost so much) and Windows runs really well.